mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
libdaemon: set CLOEXEC on client socket fd
This commit is contained in:
parent
99c443facc
commit
9dd81df8b2
@ -470,6 +470,9 @@ static int handle_connect(daemon_state s)
|
||||
if (client.socket_fd < 0)
|
||||
return 0;
|
||||
|
||||
if (fcntl(client.socket_fd, F_SETFD, FD_CLOEXEC))
|
||||
WARN(&s, "setting CLOEXEC on client socket fd %d failed", client.socket_fd);
|
||||
|
||||
if (!(ts = dm_malloc(sizeof(thread_state)))) {
|
||||
if (close(client.socket_fd))
|
||||
perror("close");
|
||||
|
Loading…
Reference in New Issue
Block a user