Le 25 mars 2013 à 16:15, Wietse Venema a écrit :

> Postfix snapshot 20130324 uses kqueue() for MacOS X 8.x in Postfix
> event handling routines (instead of using select()).  
> 
> Unfortunately, we missed one MacOS bug.
> 
> When Postfix uses kqueue() for event handling, it relies on poll()
> to enforce time limits on individual read/write operations.  Prior
> to snapshot 20130324, Postfix on MacOS X would use select() for
> both event handling and for time-limiting individual read/write
> operations.

Hello Wietse,

Would have been too nice, probably. :-(

And yet more maddening, it is clearly stated in the man page:

        BUGS
                The poll() system call currently does not support devices.


> Viktor Dukhovni reports that MacOS poll() support is still broken
> for /dev/urandom. This breaks tlsmgr(8), as discussed in:
> 
>    http://archives.neohapsis.com/archives/postfix/2009-12/thread.html#805
> 
> Workaround:
> 
>    $ make makefiles "CCARGS=-DNO_KQUEUE"
> 
> [...]
> 
> I see the following options:
> 
> [...]


I quickly looked at what Apple did for that problem; seems to be contained in:

http://www.opensource.apple.com/source/postfix/postfix-247/postfix/src/util/iostuff.h
http://www.opensource.apple.com/source/postfix/postfix-247/postfix/src/util/read_wait.c
http://www.opensource.apple.com/source/postfix/postfix-247/postfix/src/util/timed_read.c
http://www.opensource.apple.com/source/postfix/postfix-247/postfix/src/tls/tls_prng_dev.c

Don't know whether this is a good idea, but seems potentially transposable to 
the general case of OSes not allowing poll() on /dev/urandom while preserving 
the overall logics.

Axel

Reply via email to