From a1264de80fbb439076f4314b16e869fc198fb388 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 13 Jun 2003 21:46:08 +0000 Subject: fix leaked fd, potential usernetctl badness, and initlog/process bogons () --- src/ppp-watch.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ppp-watch.c') diff --git a/src/ppp-watch.c b/src/ppp-watch.c index c611d7e4..6a304179 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); -- cgit v1.2.1