mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-04 09:18:36 +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)
|
if (client.socket_fd < 0)
|
||||||
return 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 (!(ts = dm_malloc(sizeof(thread_state)))) {
|
||||||
if (close(client.socket_fd))
|
if (close(client.socket_fd))
|
||||||
perror("close");
|
perror("close");
|
||||||
|
Loading…
Reference in New Issue
Block a user