lib/guard/spork/spork_instance.rb in guard-spork-0.4.1 vs lib/guard/spork/spork_instance.rb in guard-spork-0.5.0
- old
+ new
@@ -25,15 +25,14 @@
def start
@pid = fork do
env_exec env, command
end
- store_pid
end
def stop
- Process.kill('KILL', pid)
+ ::Process.kill('KILL', pid)
end
def alive?
return false unless pid
Process.waitpid(pid, Process::WNOHANG).nil?
@@ -69,19 +68,14 @@
environment.each_pair { |key, value| ENV[key] = value }
exec command
end
end
- private
- def use_bundler?
- options[:bundler]
- end
+ private
- def store_pid
- # We need to store away the PIDs somewhere safe since
- # Guard will destroy our class instances when Guardfile is
- # reevaluated without telling us beforehand
- ENV['SPORK_PIDS'] = [ENV['SPORK_PIDS'], pid.to_s].compact.join(",")
- end
+ def use_bundler?
+ options[:bundler]
+ end
+
end
end
end