Phil Tomson wrote:
> 
> In article <200101102235.HAA11640 / hanare00.math.sci.hokudai.ac.jp>,
> GOTO Kentaro <gotoken / math.sci.hokudai.ac.jp> wrote:
> >In message "[ruby-talk:9076] Re: pid of executed program"
> >    on 01/01/11, Phil Tomson <ptkwt / user2.teleport.com> writes:
> >
> >>Unfortuneatly, no.  I've been trying to do the same thing.  The pid you
> >>get back from fork is the pid of the shell that the external command was
> >>exec'ed into, not the pid for the command itself.  What I find is that if
> >>I send a SIGTERM to the pid I get back from fork it does indeed kill the
> >>shell, but the child pid (the pid for the command that was exec'ed) isn't
> >>effected and the child just continues to run.
> >
> >See [ruby-talk:8631], i.e.,
> >http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/8631
> 
> Wow, I see that this reference is to a response to one of my posts to this
> newsgroup, yet I never saw it in my newsreader - my ISP is being taken
> over by another and I suspect that news is a bit messed up right now.
> 
> Anyway,  You say that I should do a:
> 
> kill "SIGTERM", 0
> 
> but won't that also kill the currently running script?
> 
> Phil

Actually, see
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/8610 for a
better answer.