diff options
author | 2017-02-11 19:51:06 +0000 | |
---|---|---|
committer | 2017-02-11 19:51:06 +0000 | |
commit | 65014aebf91a57834a8398456ecc3535a02b36e8 (patch) | |
tree | 88a76e7799ac343a0e5d4718526e10f22f424680 /sys/kern/exec_script.c | |
parent | Move parse_warning() into parse.c to prepare to replace errwarn.c (diff) | |
download | wireguard-openbsd-65014aebf91a57834a8398456ecc3535a02b36e8.tar.xz wireguard-openbsd-65014aebf91a57834a8398456ecc3535a02b36e8.zip |
Add a flags argument to falloc() that lets it optionally set the
close-on-exec flag on the newly allocated fd. Make falloc()'s
return arguments non-optional: assert that they're not NULL.
ok mpi@ millert@
Diffstat (limited to 'sys/kern/exec_script.c')
-rw-r--r-- | sys/kern/exec_script.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/exec_script.c b/sys/kern/exec_script.c index 27faacfcc5f..0b9ae86e224 100644 --- a/sys/kern/exec_script.c +++ b/sys/kern/exec_script.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_script.c,v 1.39 2016/04/25 20:00:33 tedu Exp $ */ +/* $OpenBSD: exec_script.c,v 1.40 2017/02/11 19:51:06 guenther Exp $ */ /* $NetBSD: exec_script.c,v 1.13 1996/02/04 02:15:06 christos Exp $ */ /* @@ -169,7 +169,7 @@ check_shell: #endif fdplock(p->p_fd); - error = falloc(p, &fp, &epp->ep_fd); + error = falloc(p, 0, &fp, &epp->ep_fd); fdpunlock(p->p_fd); if (error) goto fail; |