fix a dumb thing and another thing

This commit is contained in:
John Bintz 2011-06-25 12:57:07 -04:00
parent 2654061350
commit d0901933c1
1 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@ module Guard
def stop
if File.file?(pid_file)
system %{kill -KILL #{File.read(pid_file).strip}}
sleep sleep_time
end
end
@ -75,7 +76,7 @@ module Guard
def unmanaged_pid
pid_command = "lsof -n -i TCP:#{options[:port]}"
%x{pid_command}.each_line { |line|
%x{#{pid_command}}.each_line { |line|
if line["*:#{options[:port]} "]
return line.split("\s")[1]
end