Module Name: src Committed By: christos Date: Thu Sep 29 12:18:27 UTC 2022
Modified Files: src/sys/kern: tty_ptm.c Log Message: Add fd_set_exclose(). It is probably better to do this automatically in fd_affix()... To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/kern/tty_ptm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/tty_ptm.c diff -u src/sys/kern/tty_ptm.c:1.44 src/sys/kern/tty_ptm.c:1.45 --- src/sys/kern/tty_ptm.c:1.44 Sat Sep 24 12:29:27 2022 +++ src/sys/kern/tty_ptm.c Thu Sep 29 08:18:27 2022 @@ -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 @@ retry: 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: