Fish Man wrote: > Hi, > if I start a process in Ruby using the system("some process") > how can I get the process id of the process I've just started? > > Cheers. > Dan. Dear Fish Man, This is very simple.Just you can use Process.pid. For instance, I wll give some example, I am having one file: 1.rb system("ps") =>execute the process p Process.pid =>it will tell the current process Id. ./1.rb Next you can ruby this program. You can see this output: PID TTY TIME CMD 18662 pts/2 00:00:00 bash 18962 pts/2 00:00:00 ruby 18963 pts/2 00:00:00 ps 18962 You can combine the ruby process id and last one id is there.Both are same. This is way only we can take the process id.Other than that I don't know. by vellingiri. -- Posted via http://www.ruby-forum.com/.