X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/c18c124eaa464aaaa5549e99e5a70fc9cbb50944..3e170ce000f1506b7b5d2c5c7faec85ceabb573d:/bsd/miscfs/fifofs/fifo_vnops.c diff --git a/bsd/miscfs/fifofs/fifo_vnops.c b/bsd/miscfs/fifofs/fifo_vnops.c index 23c596618..62cc11fed 100644 --- a/bsd/miscfs/fifofs/fifo_vnops.c +++ b/bsd/miscfs/fifofs/fifo_vnops.c @@ -327,6 +327,8 @@ fifo_read(struct vnop_read_args *ap) if (error != EWOULDBLOCK) { error = soreceive(rso, (struct sockaddr **)0, uio, (struct mbuf **)0, (struct mbuf **)0, &rflags); + if (error == 0 && ap->a_vp->v_knotes.slh_first != NULL) + KNOTE(&ap->a_vp->v_knotes, 0); } else { /* clear EWOULDBLOCK and return EOF (zero) */ @@ -358,6 +360,8 @@ fifo_write(struct vnop_write_args *ap) #endif error = sosend(wso, (struct sockaddr *)0, ap->a_uio, NULL, (struct mbuf *)0, (ap->a_ioflag & IO_NDELAY) ? MSG_NBIO : 0); + if (error == 0 && ap->a_vp->v_knotes.slh_first != NULL) + KNOTE(&ap->a_vp->v_knotes, 0); return (error); }