Skip to content

Commit

Permalink
posix_spawn: handle perm issues
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Jan 24, 2024
1 parent 7d8a2d1 commit fe34e95
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit fe34e95

Please sign in to comment.