posix-spawn icon indicating copy to clipboard operation
posix-spawn copied to clipboard

POSIX::Spawn.system wrong return values and stale $? for missing commands

Open felixbuenemann opened this issue 8 years ago • 2 comments

The MRI Kernel.system method returns nil if the command could not be found, but POSIX::Spawn.system returns false.

Simple test:

puts Kernel.system("foo").inspect
puts POSIX::Spawn.system("foo").inspect

Output:

nil
false

Looking at the source this should be a one-line fix.

felixbuenemann avatar May 16 '17 15:05 felixbuenemann

@felixbuenemann Sounds good to me. Thanks for your research here.

rtomayko avatar May 16 '17 17:05 rtomayko

@rtomayko I've removed all my comments regarding $? and created a separate issue #82, so it would be great if you could do the same to avoid confusion.

felixbuenemann avatar May 16 '17 17:05 felixbuenemann