Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/sys_pipe.c
Show First 20 Lines • Show All 1,745 Lines • ▼ Show 20 Lines | case EVFILT_WRITE: | ||||
if (cpipe->pipe_peer->pipe_present != PIPE_ACTIVE) { | if (cpipe->pipe_peer->pipe_present != PIPE_ACTIVE) { | ||||
/* other end of pipe has been closed */ | /* other end of pipe has been closed */ | ||||
PIPE_UNLOCK(cpipe); | PIPE_UNLOCK(cpipe); | ||||
return (EPIPE); | return (EPIPE); | ||||
} | } | ||||
cpipe = PIPE_PEER(cpipe); | cpipe = PIPE_PEER(cpipe); | ||||
break; | break; | ||||
default: | default: | ||||
if ((cpipe->pipe_type & PIPE_TYPE_NAMED) != 0) { | |||||
PIPE_UNLOCK(cpipe); | |||||
return (vnops.fo_kqfilter(fp, kn)); | |||||
} | |||||
PIPE_UNLOCK(cpipe); | PIPE_UNLOCK(cpipe); | ||||
return (EINVAL); | return (EINVAL); | ||||
} | } | ||||
kn->kn_hook = cpipe; | kn->kn_hook = cpipe; | ||||
knlist_add(&cpipe->pipe_sel.si_note, kn, 1); | knlist_add(&cpipe->pipe_sel.si_note, kn, 1); | ||||
PIPE_UNLOCK(cpipe); | PIPE_UNLOCK(cpipe); | ||||
return (0); | return (0); | ||||
▲ Show 20 Lines • Show All 79 Lines • Show Last 20 Lines |