J
Jarod Zhu
Hi, all
I want to use system method to run a background process, like
system("ruby deamon.rb") # the deamon.rb runs a dead loop
When my main process ends, I want to end the background process
too.
How can I do it?
If I can get the pid of background process, I can use
Process.kill. But the system method dosen't return the pid.
Does anyone here know the solution?
Thank you
Jarod Zhu
I want to use system method to run a background process, like
system("ruby deamon.rb") # the deamon.rb runs a dead loop
When my main process ends, I want to end the background process
too.
How can I do it?
If I can get the pid of background process, I can use
Process.kill. But the system method dosen't return the pid.
Does anyone here know the solution?
Thank you
Jarod Zhu