Traditionally you would fork() and then exec(). You could also use the daemons gem if you really want those processes to be durable.

On Mar 21, 2010, at 1:44 PM, Guyren G Howe <[email protected]> wrote:

I can't figure out how to run a shell command entirely independently of my ruby process (so the ruby process can end and the shell process can carry on). It seems like this should give me a single active ruby process at a time, but no:

sleep 3
`nohup ruby ~/test_process.rb &`

This just builds up an endless list of ruby processes, presumably because each process is waiting for its child to finish. How do I exit without waiting?

Regards,

Guyren G Howe
Relevant Logic LLC

guyren-at-relevantlogic.com ~ http://relevantlogic.com ~ +1 512 784 3178

Ruby/Rails,  REALbasic, PHP programming
PostgreSQL, MySQL database design and consulting
Technical writing and training

Read my book, Real OOP with REALbasic: <http://relevantlogic.com/oop-book/about-the-oop-book.php >

--
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby

To unsubscribe from this group, send email to sdruby +unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

--
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby

To unsubscribe from this group, send email to sdruby+unsubscribegooglegroups.com or reply 
to this email with the words "REMOVE ME" as the subject.

Reply via email to