summaryrefslogtreecommitdiff
path: root/accel-pppd/logs/log_tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/logs/log_tcp.c')
-rw-r--r--accel-pppd/logs/log_tcp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/accel-pppd/logs/log_tcp.c b/accel-pppd/logs/log_tcp.c
index ceaeb1c..3f76ff8 100644
--- a/accel-pppd/logs/log_tcp.c
+++ b/accel-pppd/logs/log_tcp.c
@@ -210,6 +210,8 @@ static void start_connect(struct tcp_target_t *t)
return;
}
+ fcntl(t->hnd.fd, F_SETFD, fcntl(t->hnd.fd, F_GETFD) | FD_CLOEXEC);
+
if (fcntl(t->hnd.fd, F_SETFL, O_NONBLOCK)) {
log_emerg("log-tcp: failed to set nonblocking mode: %s\n", strerror(errno));
close(t->hnd.fd);