wsproc: call rb_clear_cloexec on child fds
This commit is contained in:
parent
6865484458
commit
12fd6e80c5
1 changed files with 2 additions and 4 deletions
|
@ -308,10 +308,8 @@ start_wsockd(int count)
|
||||||
snprintf(s_pid, sizeof(s_pid), "%d", (int)getpid());
|
snprintf(s_pid, sizeof(s_pid), "%d", (int)getpid());
|
||||||
rb_setenv("CTL_PPID", s_pid, 1);
|
rb_setenv("CTL_PPID", s_pid, 1);
|
||||||
|
|
||||||
#ifdef _WIN32
|
rb_clear_cloexec(F2);
|
||||||
SetHandleInformation((HANDLE) rb_get_fd(F2), HANDLE_FLAG_INHERIT, 1);
|
rb_clear_cloexec(P1);
|
||||||
SetHandleInformation((HANDLE) rb_get_fd(P1), HANDLE_FLAG_INHERIT, 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
pid = rb_spawn_process(wsockd_path, (const char **) parv);
|
pid = rb_spawn_process(wsockd_path, (const char **) parv);
|
||||||
if(pid == -1)
|
if(pid == -1)
|
||||||
|
|
Loading…
Reference in a new issue