Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Do call fd_set_exclose() on both file descriptors, ...
details: https://anonhg.NetBSD.org/src/rev/4ed3e96a0be1
branches: trunk
changeset: 770531:4ed3e96a0be1
user: njoly <njoly%NetBSD.org@localhost>
date: Thu Oct 20 18:18:21 2011 +0000
description:
Do call fd_set_exclose() on both file descriptors, to set the
close-on-exec flag.
diffstat:
sys/kern/sys_pipe.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r ff6a7419dea5 -r 4ed3e96a0be1 sys/kern/sys_pipe.c
--- a/sys/kern/sys_pipe.c Thu Oct 20 13:54:38 2011 +0000
+++ b/sys/kern/sys_pipe.c Thu Oct 20 18:18:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_pipe.c,v 1.133 2011/10/05 13:30:24 apb Exp $ */
+/* $NetBSD: sys_pipe.c,v 1.134 2011/10/20 18:18:21 njoly Exp $ */
/*-
* Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.133 2011/10/05 13:30:24 apb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.134 2011/10/20 18:18:21 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -271,6 +271,7 @@
rf->f_type = DTYPE_PIPE;
rf->f_data = (void *)rpipe;
rf->f_ops = &pipeops;
+ fd_set_exclose(l, fd, (flags & O_CLOEXEC) != 0);
error = fd_allocfile(&wf, &fd);
if (error)
@@ -280,6 +281,7 @@
wf->f_type = DTYPE_PIPE;
wf->f_data = (void *)wpipe;
wf->f_ops = &pipeops;
+ fd_set_exclose(l, fd, (flags & O_CLOEXEC) != 0);
rpipe->pipe_peer = wpipe;
wpipe->pipe_peer = rpipe;
Home |
Main Index |
Thread Index |
Old Index