R
Roger Pack
Currently with the std lib there is no (built in) way to get the PID of
a currently running child process (short of using fork, which is
unavailable on windows).
i.e.
IO.popen("ls") # what's the PID?
r,w,e,thread = Open3.popen3("ls") # what's the PID?
begin
Timeout.timeout(1) {
system("bash /c sleep")
}
rescue Timeout::Error
# what's the pid, so I can kill it?
end
Jruby has come up with a new method,
pid,r,e,w = IO.popen4("ls")
suggestion: this should be a part of std lib, for the reasons I
discussed above.
Any thoughts on this one?
Thanks.
-rp
a currently running child process (short of using fork, which is
unavailable on windows).
i.e.
IO.popen("ls") # what's the PID?
r,w,e,thread = Open3.popen3("ls") # what's the PID?
begin
Timeout.timeout(1) {
system("bash /c sleep")
}
rescue Timeout::Error
# what's the pid, so I can kill it?
end
Jruby has come up with a new method,
pid,r,e,w = IO.popen4("ls")
suggestion: this should be a part of std lib, for the reasons I
discussed above.
Any thoughts on this one?
Thanks.
-rp