ipc: set CLOEXEC on client file descriptors (Thanks biiter)

next
Michael Stapelberg 2011-11-15 23:39:43 +00:00
parent 77a9e4b18f
commit 7498ddd12f
1 changed files with 3 additions and 0 deletions

View File

@ -823,6 +823,9 @@ void ipc_new_client(EV_P_ struct ev_io *w, int revents) {
return;
}
/* Close this file descriptor on exec() */
(void)fcntl(client, F_SETFD, FD_CLOEXEC);
set_nonblock(client);
struct ev_io *package = scalloc(sizeof(struct ev_io));