From: Louis-Philippe Date: 2009-02-17T05:08:05+09:00 Subject: Re: Controlling a forked process --001636c5a3ed9ecba804630ebe44 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi Michael, you can: fork1_pid = fork { # fork 1 body } fork2_pid = fork { # fork 2 body } Process.kill('HUP', fork1_pid) Process.kill('HUP', fork2_pid) does this answer your question? 2009/2/16 Michael Satterwhite > David Masover wrote: > > > Yes. The parent process should have the process ID of the child. With > > that you can do things like: > > > > if (pid = fork) > > sleep 1 > > Process.kill('TERM', pid) > > else > > loop do > > puts 'KILL ME' > > end > > end > > on the line > if (pid = fork) > > Is fork returning the pid of the spawned process or of the current (e.g. > parent) process? More to the point, assume that I spawn multiple > processes. How can I address each of them? > > Thanks > ---Michael > -- > Posted via http://www.ruby-forum.com/. > > --001636c5a3ed9ecba804630ebe44--