From: ara.t.howard@... Date: 2006-07-12T12:50:49+09:00 Subject: Re: Processes and Portability On Wed, 12 Jul 2006, Name Name wrote: > Joel, if you do t.status after you thread off the system, you'll notice > that it says sleeping instead of running. Pretty much the thread will > make the system call and then wait on that system call to return. So > that thread is owning that process in some respects, but killing that > thread will in no means kill the process, since that process is on its > own now. > > On an unrelated note, does anyone know how to kill all children pids > including itself when one is given a pid? If that question is answered, > I think my post will be answered. harp:~ > cat a.rb Thread.new{ system 'sleep 60' } sleep 1 system 'ps' Process.kill -9, Process.pid harp:~ > ruby a.rb PID TTY TIME CMD 15149 pts/2 00:00:00 bash 6308 pts/2 00:00:00 ruby 6309 pts/2 00:00:00 sleep 6310 pts/2 00:00:00 ps Killed harp:~ > ps PID TTY TIME CMD 15149 pts/2 00:00:00 bash 6311 pts/2 00:00:00 ps -a -- suffering increases your inner strength. also, the wishing for suffering makes the suffering disappear. - h.h. the 14th dali lama