Permalink
Browse files

fix killing old pids

  • Loading branch information...
1 parent b817617 commit a16b3ccbab31b5eca9729c4feb87aa0756e79e2a @iboard committed Apr 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 config/recipes/webrick.rb
@@ -18,7 +18,7 @@
run "kill -9 #{pid}"
rescue => e
# try to kill with ps
- process = `ps xa|grep "server.*#{port}.*#{bind_ip}.*production.*#{port}.pid"|grep -v grep`
+ process = `ps xa|grep "server.*#{port}.*#{bind_ip}.*production.*#{port}.pid"|head -1`
pid = process.strip.split(/\s+/)[0]
puts "Found running process at #{process}"
begin

0 comments on commit a16b3cc

Please sign in to comment.