From 6865484458489fc4d5727e825b42a4e6f79792b7 Mon Sep 17 00:00:00 2001 From: Doug Freed Date: Sun, 13 Dec 2020 08:41:46 +0000 Subject: [PATCH] sslproc: call rb_clear_cloexec on child fds --- ircd/sslproc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ircd/sslproc.c b/ircd/sslproc.c index f9dc28fc..42338de5 100644 --- a/ircd/sslproc.c +++ b/ircd/sslproc.c @@ -322,10 +322,9 @@ start_ssldaemon(int count) rb_setenv("CTL_PIPE", fdarg, 1); snprintf(s_pid, sizeof(s_pid), "%d", (int)getpid()); rb_setenv("CTL_PPID", s_pid, 1); -#ifdef _WIN32 - SetHandleInformation((HANDLE) rb_get_fd(F2), HANDLE_FLAG_INHERIT, 1); - SetHandleInformation((HANDLE) rb_get_fd(P1), HANDLE_FLAG_INHERIT, 1); -#endif + + rb_clear_cloexec(F2); + rb_clear_cloexec(P1); pid = rb_spawn_process(ssld_path, (const char **) parv); if(pid == -1)