On Sat, 2009-01-10 at 16:14 -0500, Casey Dahlin wrote:Its purely an api question. We could easily take the WNOHANG flag and just unset it when we get it and set O_NONBLOCK instead. We need O_CLOEXEC anyway though, and the only reason to do it would be to get rid of the O_ options and take only one type of flag (that and just a little more waitid consistency).
From the perspective of waitfd, the only difference between WNOHANG andWell, you get O_NONBLOCK for free by having a file descriptor; and you
O_NONBLOCK is which argument you put the flags in. The API should only
support one or the other, but internally they would imply the same thing.
can't turn off people trying to turn it on/off with fcntl() - so you may
as well just use that, no? :-)
Scott