From: Jason Wold Date: 2004-04-28T16:06:13+09:00 Subject: Re: popen, popen3, and leftover processes Ah, but I just noticed that popen3 doesn't save the pid info on any of the IO objects it returns. bug or missing feature? On Wed, 28 Apr 2004 00:00:31 -0700, Jason Wold wrote: > > >io=IO.popen("sleep 1000") > => # > > >io.pid > => 2676 > > >puts `ps auwx | grep sleep` > ital 2676 0.0 0.1 1900 472 pts/0 S 23:58 0:00 sleep 1000 > ital 2677 0.0 0.3 2048 872 pts/0 S 23:59 0:00 sh -c > ps auwx | grep sleep > ital 2679 0.0 0.1 1500 432 pts/0 S 23:59 0:00 grep sleep > => nil > > > > On Wed, 28 Apr 2004 15:52:49 +0900, Hal Fulton wrote: > > > > I'm getting processes left lying around when I do things > > like > > > > io = IO.popen("foo") # or... > > inp, out, err = Open3.popen3("foobar") > > > > I've tried such things as closing the io object, but to > > no avail. > > > > I see no way of retrieving the pid in either case. > > > > What can I do? > > > > Thanks, > > Hal > > > > >