librb/helper: call rb_clear_cloexec on child fds
This commit is contained in:
parent
1cad0654b7
commit
71325a9801
1 changed files with 2 additions and 4 deletions
|
@ -148,10 +148,8 @@ rb_helper_start(const char *name, const char *fullpath, rb_helper_cb * read_cb,
|
||||||
parv[0] = buf;
|
parv[0] = buf;
|
||||||
parv[1] = NULL;
|
parv[1] = NULL;
|
||||||
|
|
||||||
#ifdef _WIN32
|
rb_clear_cloexec(in_f[1]);
|
||||||
SetHandleInformation((HANDLE) rb_get_fd(in_f[1]), HANDLE_FLAG_INHERIT, 1);
|
rb_clear_cloexec(out_f[0]);
|
||||||
SetHandleInformation((HANDLE) rb_get_fd(out_f[0]), HANDLE_FLAG_INHERIT, 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
pid = rb_spawn_process(fullpath, (const char **)parv);
|
pid = rb_spawn_process(fullpath, (const char **)parv);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue