>>>>> "P" == Phil Tomson <ptkwt / user2.teleport.com> writes: P> So the question is: when you do an 'open("|somesystemcommand")' there seem P> to be two forks occuring - is this true? One fork for the shell and P> another fork for the command to be run in that shell - is this correct? You have only one fork, but if in the command ruby find a special character like *?{}[]<>()~&|\\$;'`\"\n it will call '/bin/sh -c somesystemcommand' via execl(), otherwise it just make an execv() In your example there was `>', try without this special character P> If that is the case, then how do I get the pid for the system command that P> I'm running with the open so that it can be killed after some amount of P> time? Replace your kill "SIGTERM", f.pid by kill "SIGTERM", 0 and the 2 processes are killed P> All this seems to also apply to 'system("somesystemcommand")' as well. This is the same, I think Guy Decoux