diff options
| author | 2001-10-26 12:03:27 +0000 | |
|---|---|---|
| committer | 2001-10-26 12:03:27 +0000 | |
| commit | af97e5cfdd9f3b11ddf6b53127c6fa8808c13864 (patch) | |
| tree | 196c0184f49baa99376ee4bc29405db139ede540 /sys/kern/sys_pipe.c | |
| parent | Well, "zap kernfs" and MISS! (diff) | |
| download | wireguard-openbsd-af97e5cfdd9f3b11ddf6b53127c6fa8808c13864.tar.xz wireguard-openbsd-af97e5cfdd9f3b11ddf6b53127c6fa8808c13864.zip | |
- every new fd created by falloc() is marked as larval and should not be used
any anyone. Every caller of falloc matures the fd when it's usable.
- Since every lookup in the fd table must now check this flag and all of
them do the same thing, move all the necessary checks into a function -
fd_getfile.
Diffstat (limited to 'sys/kern/sys_pipe.c')
| -rw-r--r-- | sys/kern/sys_pipe.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 13084a9ed56..48290fb70dd 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_pipe.c,v 1.38 2001/09/19 20:50:58 mickey Exp $ */ +/* $OpenBSD: sys_pipe.c,v 1.39 2001/10/26 12:03:27 art Exp $ */ /* * Copyright (c) 1996 John S. Dyson @@ -143,6 +143,8 @@ sys_opipe(p, v, retval) rpipe->pipe_peer = wpipe; wpipe->pipe_peer = rpipe; + FILE_SET_MATURE(rf); + FILE_SET_MATURE(wf); return (0); free3: ffree(rf); |
