Print this page
OS-3137 lxbrand pipe does not pollnotify when end is closed
*** 612,624 ****
}
/*
* The other end of the pipe is almost closed so
* reject any other open on this end of the pipe
! * This only happens with a pipe mounted under namefs
*/
! if ((fnp->fn_flag & (FIFOCLOSE|ISPIPE)) == (FIFOCLOSE|ISPIPE)) {
fifo_cleanup(oldvp, flag);
cv_broadcast(&fnp->fn_wait_cv);
if (!lockheld)
mutex_exit(&fn_lock->flk_lock);
return (ENXIO);
--- 612,627 ----
}
/*
* The other end of the pipe is almost closed so
* reject any other open on this end of the pipe
! * This normally only happens with a pipe mounted under namefs, but
! * we can also see an open via proc/fd, which should still succeed.
! * To indicate the proc/fd case the FKLYR flag is passed.
*/
! if ((fnp->fn_flag & (FIFOCLOSE|ISPIPE)) == (FIFOCLOSE|ISPIPE) &&
! (flag & FKLYR) == 0) {
fifo_cleanup(oldvp, flag);
cv_broadcast(&fnp->fn_wait_cv);
if (!lockheld)
mutex_exit(&fn_lock->flk_lock);
return (ENXIO);