Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Always send KILL signail (kill -9)

What's the worst that could happen?
  • Loading branch information...
commit c7e1b165e7f936b3c993347035cd06d7154a2c5c 1 parent 371e55b
@sandro authored
View
2  lib/specjour/dispatcher.rb
@@ -81,7 +81,7 @@ def fork_local_manager
fetch_manager(manager.drb_uri)
at_exit do
unless Specjour.interrupted?
- Process.kill('TERM', manager.pid) rescue Errno::ESRCH
+ Process.kill('KILL', manager.pid) rescue Errno::ESRCH
end
end
end
View
2  lib/specjour/loader.rb
@@ -121,7 +121,7 @@ def kill_worker_processes
if Specjour.interrupted?
Process.kill('INT', *worker_pids) rescue Errno::ESRCH
else
- Process.kill('TERM', *worker_pids) rescue Errno::ESRCH
+ Process.kill('KILL', *worker_pids) rescue Errno::ESRCH
end
end
View
2  lib/specjour/manager.rb
@@ -85,7 +85,7 @@ def kill_loader_process
if Specjour.interrupted?
Process.kill('INT', loader_pid) rescue Errno::ESRCH
else
- Process.kill('TERM', loader_pid) rescue Errno::ESRCH
+ Process.kill('KILL', loader_pid) rescue Errno::ESRCH
end
@loader_pid = nil
end
View
2  lib/specjour/rsync_daemon.rb
@@ -46,7 +46,7 @@ def start
def stop
if pid
- Process.kill("TERM", pid)
+ Process.kill("KILL", pid)
FileUtils.rm(pid_file)
end
end
View
4 spec/specjour/rsync_daemon_spec.rb
@@ -51,8 +51,8 @@
stub(FileUtils).rm
end
- it "kills the pid with TERM" do
- mock(Process).kill('TERM', subject.pid)
+ it "kills the pid with KILL" do
+ mock(Process).kill('KILL', subject.pid)
subject.stop
end
Please sign in to comment.
Something went wrong with that request. Please try again.