From: byronsalty Date: 2007-06-17T01:55:02+09:00 Subject: Re: Process id On Jun 16, 12:13 pm, 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 You can see the process id by putting this as the first line: print "#{Process.pid}\n" Alternatively you seem to be using a *nix computer so you can find the process with ps: ps -ef | grep ruby - Byron ----- http://www.saltylabs.com/