From: james.d.masters@... Date: 2007-06-17T02:50:08+09:00 Subject: Re: Process id On Jun 16, 9:13 am, Gianni Dupro wrote: > Hi everybody I m nobie of ruby > > I need some hint about to catch a id of a certain process > > for instance if I run this line of code > > `ruby file.rb` there is a possibility to have the id of this process > (file.rb process) > > my problem if the file.rb was lock I need the pId for kill it > > Thanks to all > > Best Regards > > joksy > > -- > Posted viahttp://www.ruby-forum.com/. A quick look at Kernel#` in the Ruby documentation (http://www.ruby- doc.org/core/) mentions a special (Perl-esque) variable $? which can be used after calling a system command with ``: bash-2.05a$ irb.bat irb(main):001:0> `echo "hi"` => "\"hi\"\n" irb(main):002:0> $?.pid => 3124 And as you can see that variable happens to have a #pid method. Does anyone know if there is a better way without using the esoteric $? variable? -James