Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
felixbuenemann opened this issue May 16, 2017 · 2 comments

Comments

@felixbuenemann
Copy link

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 felixbuenemann changed the title POSIX::Spawn.system wrong return values for missing commands POSIX::Spawn.system wrong return values and stale $? for missing commands May 16, 2017
@rtomayko
Copy link
Owner

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

@felixbuenemann
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants