On Wed, May 27, 2009 at 12:57:26PM -0700, Kyle Hamilton wrote: > Is it open()ed as O_NONBLOCK, or is it ioctl()'d to O_NONBLOCK? I > believe it requires ioctl.
I don't believe that socket(2) supports O_NONBLOCK. So generally sockets are born blocking, though accepted(2) sockets are born non-blocking if the listener socket is non-blocking. Postfix uses fcntl(2) when a descriptor needs to be made non-blocking: if ((flags = fcntl(fd, F_GETFL, 0)) < 0) msg_fatal("fcntl: get flags: %m"); if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0) msg_fatal("fcntl: set non-blocking flag on: %m"); -- Viktor. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org