posix-spawn
posix-spawn copied to clipboard
POSIX::Spawn.system wrong return values and stale $? for missing commands
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 Sounds good to me. Thanks for your research here.
@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.