Difference between revisions of "Working with Sub-processes in Ruby"
Jump to navigation
Jump to search
PeterHarding (talk | contribs) (Created page with " When working on a POSIX OS you can use fork and exec. fork => Create a subprocess exec => Replace current process with another process You then need to inform that your ...") |
PeterHarding (talk | contribs) |
||
Line 6: | Line 6: | ||
exec => Replace current process with another process | exec => Replace current process with another process | ||
You | You can advise your main-process that you do not need to wait in the completion of the sub-process using the Process.detach call. | ||
<pre> | <pre> |
Latest revision as of 11:02, 30 July 2012
When working on a POSIX OS you can use fork and exec.
fork => Create a subprocess
exec => Replace current process with another process
You can advise your main-process that you do not need to wait in the completion of the sub-process using the Process.detach call.
job1 = fork do exec "/path/to/daemon01" end Process.detach(job1) ...