From: Alex Young Date: 2011-03-25T19:32:10+09:00 Subject: Re: Pid of the other end of a popen3? Robert K. wrote in post #989166: > On Fri, Mar 25, 2011 at 10:58 AM, Alex Young > wrote: >> >> And it always raises. Looking at the source for Open3.popen3, it looks >> like the child pid gets swallowed by the double-fork. Is there any way >> to get it back? > > What "double fork"? It seems you are using the wrong method: > > irb(main):021:0> Open3.popen3("sleep", "5") {|a,b,c,t| p a.pid, t[:pid]} Sorry, I missed a vital bit of information, that being which Ruby version I'm on: ruby-1.8.7-p302 :003 > Open3.popen3("sleep", "5") {|a,b,c,t| p a.pid; p t[:pid]} nil NoMethodError: undefined method `[]' for nil:NilClass -- Alex -- Posted via http://www.ruby-forum.com/.