Popen and EVFILT_WRITE question
Harti Brandt
hartmut.brandt at dlr.de
Mon Mar 31 00:10:50 PDT 2008
On Mon, 31 Mar 2008, Dag-Erling Smrgrav wrote:
DS>Mel <fbsd.hackers at rachie.is-a-geek.net> writes:
DS>
DS>> EV_SET(&changes[0], fileno(proc), EVFILT_WRITE, EV_ADD|EV_ENABLE, 0,
DS>> 0, 0);
DS>> EV_SET(&changes[1], fileno(proc), EVFILT_READ, EV_ADD|EV_ENABLE, 0,
DS>> 0, 0);
DS>
DS>This is never going to work.
DS>
DS>First, the second kevent overrides the first, because they both have the
DS>same ident.
Why is that so? The man page states that the kevent is identified by the
(ident, filter) pair. This would also make more sense, because with
bi-directional descriptors (sockets or so) you might want to 'select' on read
and write.
harti
More information about the freebsd-hackers
mailing list