Skip to content

Commit

Permalink
posix_spawn: always compute envp
Browse files Browse the repository at this point in the history
posix_spawn doesn't inherit any env, so we need to always
pass it all.
  • Loading branch information
byroot committed Jan 22, 2024
1 parent 10988dc commit b995576
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b995576

Please sign in to comment.