Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
process fire and forget?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Yukihiro Matsumoto, post: 4450791"] Hi, In message "Re: process fire and forget?" |Is there a ruby way of firing up a process and then |forget about it? --------------------------------------------------------- Process#detach Process.detach(pid) => thread ------------------------------------------------------------------------ Some operating systems retain the status of terminated child processes until the parent collects that status (normally using some variant of +wait()+. If the parent never collects this status, the child stays around as a _zombie_ process. +Process::detach+ prevents this by setting up a separate Ruby thread whose sole job is to reap the status of the process _pid_ when it terminates. Use +detach+ only when you do not intent to explicitly wait for the child to terminate. +detach+ only checks the status periodically (currently once each second). [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
process fire and forget?
Top