summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/tty_pts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/tty_pts.c b/sys/kern/tty_pts.c
index d5efed3..d6a2477 100644
--- a/sys/kern/tty_pts.c
+++ b/sys/kern/tty_pts.c
@@ -825,10 +825,10 @@ sys_posix_openpt(struct thread *td, struct posix_openpt_args *uap)
* POSIX states it's unspecified when other flags are passed. We
* don't allow this.
*/
- if (uap->flags & ~(O_RDWR|O_NOCTTY))
+ if (uap->flags & ~(O_RDWR|O_NOCTTY|O_CLOEXEC))
return (EINVAL);
- error = falloc(td, &fp, &fd, 0);
+ error = falloc(td, &fp, &fd, uap->flags);
if (error)
return (error);
OpenPOWER on IntegriCloud