If the command run by POSIX::Spawn.system fails to execute because it was not found (Errno:ENOENT raised by POSIX::Spawn.spawn), the content of the $? global variable is not updated on macOS 10.12.14, which differs from the behavior of Kernel.system which sets $? to an Instance of Process::Status with exitstatus 127.
If the command run by
POSIX::Spawn.system
fails to execute because it was not found (Errno:ENOENT
raised byPOSIX::Spawn.spawn
), the content of the$?
global variable is not updated on macOS 10.12.14, which differs from the behavior ofKernel.system
which sets$?
to an Instance ofProcess::Status
with exitstatus 127.macOS 10.12.4:
Linux (Debian Jessie):
Note that
$?
staysnil
in thePOSIX::Spawn
case on macOS.This issue is loosely related to and was extracted from #81.