diff options
author | Niels Provos <provos@cvs.openbsd.org> | 1999-07-13 15:17:54 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 1999-07-13 15:17:54 +0000 |
commit | d0e661be14492b0bc5cc1cd3252e0a4302c8a350 (patch) | |
tree | de457786be963b3322bbd360c2a883f7466231fe /sys/kern/sys_pipe.c | |
parent | 7bb26b9d5348995f3970820e647e2058c0fa94c9 (diff) |
introduce fdremove() to mark a file descriptor as unused. fdremove makes
sure that the fd_freefile hints stay in sync, otherwise free file
descriptors might not be overlooked by fdalloc(); ok millert@
Diffstat (limited to 'sys/kern/sys_pipe.c')
-rw-r--r-- | sys/kern/sys_pipe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 0a3b4733741..0673d952d38 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_pipe.c,v 1.15 1999/06/08 16:05:22 deraadt Exp $ */ +/* $OpenBSD: sys_pipe.c,v 1.16 1999/07/13 15:17:50 provos Exp $ */ /* * Copyright (c) 1996 John S. Dyson @@ -201,7 +201,7 @@ sys_opipe(p, v, retval) return (0); free3: ffree(rf); - fdp->fd_ofiles[retval[0]] = NULL; + fdremove(fdp, retval[0]); free2: (void)pipeclose(wpipe); (void)pipeclose(rpipe); |