Index: kern_descrip.c =================================================================== RCS file: /cvsroot/src/sys/kern/kern_descrip.c,v retrieving revision 1.242 diff -u -u -r1.242 kern_descrip.c --- kern_descrip.c 3 Jan 2019 10:16:43 -0000 1.242 +++ kern_descrip.c 20 Feb 2019 18:52:38 -0000 @@ -750,7 +750,7 @@ fdfile_t *ff; fdtab_t *dt; - if (flags & ~(O_CLOEXEC|O_NONBLOCK)) + if (flags & ~(O_CLOEXEC|O_NONBLOCK|O_NOSIGPIPE)) return EINVAL; /* * Ensure there are enough slots in the descriptor table, @@ -791,7 +791,7 @@ mutex_exit(&fdp->fd_lock); dt->dt_ff[newfd]->ff_exclose = (flags & O_CLOEXEC) != 0; - fp->f_flag |= flags & FNONBLOCK; + fp->f_flag |= flags & (FNONBLOCK|FNOSIGPIPE); /* Slot is now allocated. Insert copy of the file. */ fd_affix(curproc, fp, newfd); if (ff != NULL) {