Nil exitstatus

Hi,

With the following code (1.9.3-p125) I very occasionally find that @exitCode is nil...

    Open3.popen3(@environment, @command, options) do |stdin, stdout, stderr, wait_thr|
      ...
      @exitCode = wait_thr.value.exitstatus
    End

Does anyone know how I should interpret this? Dare I interpret it as success (ie equivalent to 0)? Or is it most probably just a bug?

Cheers,
James

signal?

% ruby -ropen3 -ve '
Open3.popen3("sleep 1") {|i, o, e, w|
  Process.kill :TERM, w.pid
  p w.value.exitstatus
  p w.value
}'
ruby 2.0.0dev (2012-03-16 trunk 35049) [x86_64-linux]
nil
#<Process::Status: pid 4079 SIGTERM (signal 15)>

···

2012/6/14 James French <James.French@naturalmotion.com>:

With the following code (1.9.3-p125) I very occasionally find that @exitCode
is nil...

    Open3.popen3(@environment, @command, options) do |stdin, stdout, stderr,
wait_thr|

      ...

      @exitCode = wait_thr.value.exitstatus

--
Tanaka Akira

signal?

% ruby -ropen3 -ve '
Open3.popen3("sleep 1") {|i, o, e, w|
  Process.kill :TERM, w.pid
  p w.value.exitstatus
  p w.value
}'
ruby 2.0.0dev (2012-03-16 trunk 35049) [x86_64-linux] nil
#<Process::Status: pid 4079 SIGTERM (signal 15)>

···

-----Original Message-----
From: tanaka.akira@gmail.com [mailto:tanaka.akira@gmail.com] On Behalf Of Tanaka Akira
Sent: 14 June 2012 12:04
To: ruby-talk ML
Subject: Re: nil exitstatus

2012/6/14 James French <James.French@naturalmotion.com>:

With the following code (1.9.3-p125) I very occasionally find that
@exitCode is nil...

    Open3.popen3(@environment, @command, options) do |stdin, stdout,
stderr, wait_thr|

      ...

      @exitCode = wait_thr.value.exitstatus

--
Tanaka Akira

Ah! Thanks for that.