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: always compute envp
posix_spawn doesn't inherit any env, so we need to always
pass it all.
  • Loading branch information
byroot committed Jan 24, 2024
commit 9b75de1a29556e8f17932e7034c18a2a6f1664b4
2 changes: 2 additions & 0 deletions process.c
Original file line number Diff line number Diff line change
@@ -372,6 +372,8 @@ static rb_pid_t cached_pid;
#define execv(path, argv) (rb_async_bug_errno("unreachable: async-signal-unsafe execv() is called", 0))
#define execl(path, arg0, arg1, arg2, term) do { extern char **environ; execle((path), (arg0), (arg1), (arg2), (term), (environ)); } while (0)
#define ALWAYS_NEED_ENVP 1
#elif defined(HAVE_POSIX_SPAWN)
#define ALWAYS_NEED_ENVP 1
#else
#define ALWAYS_NEED_ENVP 0
#endif