lib/knj/unix_proc.rb in knjrbfw-0.0.72 vs lib/knj/unix_proc.rb in knjrbfw-0.0.74

- old
+ new

@@ -138,9 +138,14 @@ #Kills the process with 9. def kill! Process.kill(9, @data["pid"].to_i) end + #Hash-compatible. + def to_h + return @data.clone + end + #Tries to kill the process gently, waits a couple of secs to check if the process is actually dead, then sends -9 kill signals. def kill_ensure(args = {}) begin self.kill sleep 0.1 \ No newline at end of file