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

Use posix spawn #551

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
posix_spawn: handle perm issues
  • Loading branch information
byroot committed Jan 24, 2024
commit fe34e95ac01833ce6a4f4df28865cacf7ce4205b
5 changes: 5 additions & 0 deletions process.c
Original file line number Diff line number Diff line change
@@ -4756,6 +4756,11 @@ rb_posix_spawn(struct rb_execarg *eargp)
posix_spawn_file_actions_destroy(&file_actions);

if (err) {
// posix_spawn only returns fork/vfork/clone failures.
// If it failed but errno == 0, then it must be an "exec" failure.
if (errno == 0) {
eaccess(abspath, X_OK);
}
rb_sys_fail(abspath);
}