summaryrefslogtreecommitdiffstats
path: root/src/ppp-watch.c
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-06-13 21:52:17 +0000
committerBill Nottingham <notting@redhat.com>2003-06-13 21:52:17 +0000
commit373493d3d8478cf5e5c2936df986dd0c046213e3 (patch)
tree89b415962dc5a1fc96ee0785bc473c8d8b6eee29 /src/ppp-watch.c
parent0cad423a80a0805c129a25ae2ca47bf2195f9b5c (diff)
initlog, usernetctl, and ppp-watch fixes (<linux_4ever@yahoo.com>)
Diffstat (limited to 'src/ppp-watch.c')
-rw-r--r--src/ppp-watch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ppp-watch.c b/src/ppp-watch.c
index e383694c..8d947b9d 100644
--- a/src/ppp-watch.c
+++ b/src/ppp-watch.c
@@ -162,6 +162,9 @@ detach(char *device) {
* of the pppd process to its parent (i.e., it reads nothing). */
close (pipeArray[0]);
+ /* Don't leak this into programs we call. */
+ fcntl(pipeArray[1], F_SETFD, FD_CLOEXEC);
+
/* Redirect stdio to /dev/null. */
fd = open("/dev/null", O_RDONLY);
dup2(fd, STDIN_FILENO);