summaryrefslogtreecommitdiffstats
path: root/server-client.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2010-10-16 08:31:55 +0000
committerNicholas Marriott <nicm@openbsd.org>2010-10-16 08:31:55 +0000
commitf56b4ec2ffa6d5667a3bd86040a1c771c1de33a5 (patch)
treea06294130e18067eca755eb7e91ad6faa548e55c /server-client.c
parent6c42f1a89e16d69d5fe24bb8b3f6b37148cfa308 (diff)
Trying to set FD_CLOEXEC on every fd is a lost cause, just use
closefrom() before exec.
Diffstat (limited to 'server-client.c')
-rw-r--r--server-client.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/server-client.c b/server-client.c
index 427f8dfb..cd3eb079 100644
--- a/server-client.c
+++ b/server-client.c
@@ -60,8 +60,6 @@ server_client_create(int fd)
fatal("fcntl failed");
if (fcntl(fd, F_SETFL, mode|O_NONBLOCK) == -1)
fatal("fcntl failed");
- if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
- fatal("fcntl failed");
c = xcalloc(1, sizeof *c);
c->references = 0;
@@ -706,8 +704,6 @@ server_client_msg_dispatch(struct client *c)
if ((mode = fcntl(c->stdin_fd, F_GETFL)) != -1)
fcntl(c->stdin_fd, F_SETFL, mode|O_NONBLOCK);
- if (fcntl(c->stdin_fd, F_SETFD, FD_CLOEXEC) == -1)
- fatal("fcntl failed");
server_client_msg_identify(c, &identifydata, imsg.fd);
break;
@@ -725,8 +721,6 @@ server_client_msg_dispatch(struct client *c)
if ((mode = fcntl(c->stdout_fd, F_GETFL)) != -1)
fcntl(c->stdout_fd, F_SETFL, mode|O_NONBLOCK);
- if (fcntl(c->stdout_fd, F_SETFD, FD_CLOEXEC) == -1)
- fatal("fcntl failed");
break;
case MSG_STDERR:
if (datalen != 0)
@@ -742,8 +736,6 @@ server_client_msg_dispatch(struct client *c)
if ((mode = fcntl(c->stderr_fd, F_GETFL)) != -1)
fcntl(c->stderr_fd, F_SETFL, mode|O_NONBLOCK);
- if (fcntl(c->stderr_fd, F_SETFD, FD_CLOEXEC) == -1)
- fatal("fcntl failed");
break;
case MSG_RESIZE:
if (datalen != 0)