. select callback on close() on a pipe
would falsely revive a read-select on
the pipe
. the extra pipe_check catches it
. fixes the new import of the netbsd
make in -j N mode (make jobs that communicate
with pipes)
if (f->filp_count < 1 || !(f->filp_pipe_select_ops & selop) ||
f->filp_vno != vp)
continue;
+
+ /* Do a pipe_check to see if we really want to callback this
+ * select; a close() doesn't always warrant it.
+ */
+ if(pipe_check(f, op == VFS_READ ? READING : WRITING,
+ f->filp_flags & ~O_NONBLOCK, 1, 1) == SUSPEND) {
+ continue;
+ }
select_callback(f, selop);
+
f->filp_pipe_select_ops &= ~selop;
}
}