diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1998-09-23 22:48:09 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1998-09-23 22:48:09 +0000 |
commit | d7c3b0b972ac2bfe24f8457725222addd05351aa (patch) | |
tree | 60368dbd7d16d38abddf3efc3f92df7bdf4e8f2c | |
parent | 799bc3b1b3ace40f9440a7fc3d1085e2c060fb07 (diff) |
use the same flags for f_flag as there were used for vn_open, otherwise vn_close will not decrease v_writecount for the vnode causing panics
-rw-r--r-- | sys/kern/kern_exec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 58a4780ccd0..6de7744cdf9 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exec.c,v 1.23 1998/07/28 00:13:05 millert Exp $ */ +/* $OpenBSD: kern_exec.c,v 1.24 1998/09/23 22:48:08 art Exp $ */ /* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */ /*- @@ -501,7 +501,7 @@ sys_execve(p, v, retval) p->p_fd->fd_ofiles[indx] = NULL; break; } - fp->f_flag = FREAD; + fp->f_flag = FREAD | (i == 0 ? 0 : FWRITE); fp->f_type = DTYPE_VNODE; fp->f_ops = &vnops; fp->f_data = (caddr_t)nd.ni_vp; |