IO.popen4 returns the wrong pid in Linux
----------------------------------------

                 Key: JRUBY-4908
                 URL: http://jira.codehaus.org/browse/JRUBY-4908
             Project: JRuby
          Issue Type: Bug
         Environment: jruby 1.6.0.dev (ruby 1.8.7 patchlevel 249) (2010-06-25 
fatal: unrecognized argument: --format=format:%h) (Java HotSpot(TM) Client VM 
1.6.0_17) [i386-java]
            Reporter: Roger Pack
            Assignee: Thomas E Enebo


In irb, I see this:

>> IO.popen4("ruby -e 'loop {}'")
=> [21498, #<IO:0x90fa05>, #<IO:0xe7d53>, #<IO:0x145fe3b>]

However, killing that process doesn't actually kill ruby.  In this instance 
(and, indeed, all instances, it appears), ruby's "real" process id is that + 1:

top shows it as:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
21499 rdp       20   0  6960 3092 1952 R   89  0.1   2:20.07 ruby

Thanks much.
-rp

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to