Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Add fd_set_exclose(). It is probably better to do t...



details:   https://anonhg.NetBSD.org/src/rev/01d6fc75ace5
branches:  trunk
changeset: 371223:01d6fc75ace5
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Sep 29 12:18:27 2022 +0000

description:
Add fd_set_exclose(). It is probably better to do this automatically in
fd_affix()...

diffstat:

 sys/kern/tty_ptm.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r da4da64752ff -r 01d6fc75ace5 sys/kern/tty_ptm.c
--- a/sys/kern/tty_ptm.c        Thu Sep 29 10:27:02 2022 +0000
+++ b/sys/kern/tty_ptm.c        Thu Sep 29 12:18:27 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tty_ptm.c,v 1.44 2022/09/24 16:29:27 christos Exp $    */
+/*     $NetBSD: tty_ptm.c,v 1.45 2022/09/29 12:18:27 christos Exp $    */
 
 /*-
  * Copyright (c) 2004, 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tty_ptm.c,v 1.44 2022/09/24 16:29:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty_ptm.c,v 1.45 2022/09/29 12:18:27 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -204,7 +204,9 @@
        fp->f_type = DTYPE_VNODE;
        fp->f_ops = &vnops;
        fp->f_vnode = vp;
+
        VOP_UNLOCK(vp);
+       fd_set_exclose(l, *fd, (flags & O_CLOEXEC) != 0);
        fd_affix(curproc, fp, *fd);
        return 0;
 bad:



Home | Main Index | Thread Index | Old Index