kill -INT not kiling process on linux. switched to kill -KILL
This commit is contained in:
parent
39c964a968
commit
a4ca91faae
|
@ -21,7 +21,7 @@ module Guard
|
||||||
|
|
||||||
def stop
|
def stop
|
||||||
if File.file?(pid_file)
|
if File.file?(pid_file)
|
||||||
system %{kill -INT #{File.read(pid_file).strip}}
|
system %{kill -KILL #{File.read(pid_file).strip}}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ module Guard
|
||||||
|
|
||||||
def kill_unmanaged_pid!
|
def kill_unmanaged_pid!
|
||||||
if pid = unmanaged_pid
|
if pid = unmanaged_pid
|
||||||
system %{kill -INT #{pid}}
|
system %{kill -KILL #{pid}}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -80,6 +80,12 @@ module Guard
|
||||||
return line.split("\s")[1]
|
return line.split("\s")[1]
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
elsif RbConfig::CONFIG['host_os'] =~ /linux/
|
||||||
|
%x{lsof -i :#{options[:port]}}.each_line { |line|
|
||||||
|
if line["*:#{options[:port]} "]
|
||||||
|
return line.split("\s")[1]
|
||||||
|
end
|
||||||
|
}
|
||||||
end
|
end
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue