apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: Unable to set sockets to non blocking on OpenBSD
Date Fri, 27 Aug 2004 06:16:05 GMT
On Thu, Aug 26, 2004 at 07:30:33PM -0700, Ken Simpson wrote:
> Unfortunately, in APR, Unix sockets are assumed to initially be
> blocking even though on OpenBSD this appears to not be true:

I expect what you're seeing is that APR thinks that O_NONBLOCK is not
inherited across accept(), although it is on OpenBSD.  There is a
configure test for this, but I bet it doesn't work because binding to an
ephemeral port doesn't work on OpenBSD IIRC.

If you have all the necessary autofoo installed, you could try this
patch (then run ./buildconf):

Index: build/apr_hints.m4	
===================================================================
RCS file: /home/cvs/apr/build/apr_hints.m4,v
retrieving revision 1.68
diff -u -r1.68 apr_hints.m4
--- build/apr_hints.m4	12 Aug 2004 13:44:29 -0000	1.68
+++ build/apr_hints.m4	27 Aug 2004 06:12:04 -0000
@@ -131,6 +131,7 @@
         ;;
     *-openbsd*)
 	APR_ADDTO(CPPFLAGS, [-D_POSIX_THREADS])
+        APR_SETIFNULL(ac_cv_o_nonblock_inherited, [yes])
 	;;
     *-netbsd*)
 	APR_ADDTO(CPPFLAGS, [-DNETBSD])



Mime
View raw message