more sockets to close on fork()
This commit is contained in:
parent
024e556cb2
commit
df99859ad2
|
@ -110,6 +110,9 @@ Butler::start_thread()
|
|||
return -1;
|
||||
}
|
||||
|
||||
fcntl(request_pipe[0], F_SETFD, fcntl(request_pipe[0], F_GETFD) | FD_CLOEXEC);
|
||||
fcntl(request_pipe[1], F_SETFD, fcntl(request_pipe[1], F_GETFD) | FD_CLOEXEC);
|
||||
|
||||
//pthread_detach (thread);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -74,6 +74,8 @@ rdff_open(const char* path, bool write)
|
|||
}
|
||||
}
|
||||
|
||||
fcntl(fileno(fd), F_SETFD, fcntl(fileno(fd), F_GETFD) | FD_CLOEXEC);
|
||||
|
||||
RDFF ret = (RDFF)malloc(sizeof(struct _RDFF));
|
||||
ret->fd = fd;
|
||||
ret->size = size;
|
||||
|
|
|
@ -52,6 +52,8 @@ CrossThreadChannel::CrossThreadChannel (bool non_blocking)
|
|||
return;
|
||||
}
|
||||
}
|
||||
fcntl(fds[0], F_SETFD, fcntl(fds[0], F_GETFD) | FD_CLOEXEC);
|
||||
fcntl(fds[1], F_SETFD, fcntl(fds[1], F_GETFD) | FD_CLOEXEC);
|
||||
}
|
||||
|
||||
CrossThreadChannel::~CrossThreadChannel ()
|
||||
|
|
Loading…
Reference in New Issue
Block a user