You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Ken Simpson <ks...@larch.mailchannels.com> on 2004/08/28 00:44:20 UTC
Fw: Re: Unable to set sockets to non blocking on OpenBSD
Here's the solution to the blocking sockets problem discussed earlier
on the list -- straight from the APR folks. I have tested this
solution and it works.
----- Forwarded message from Joe Orton <jo...@redhat.com> -----
From: Joe Orton <jo...@redhat.com>
Date: Fri, 27 Aug 2004 07:16:05 +0100
To: Ken Simpson <ks...@larch.mailchannels.com>
Cc: dev@apr.apache.org
Subject: Re: Unable to set sockets to non blocking on OpenBSD
User-Agent: Mutt/1.4.1i
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])
----- End forwarded message -----
--
MailChannels: Imagine no more spam
--
http://www.mailchannels.com
MailChannels Corporation
Suite 1600, 1188 West Georgia St.
Vancouver, BC, Canada
Ken Simpson, CEO
+1-604-729-1741
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: Fw: Re: Unable to set sockets to non blocking on OpenBSD
Posted by Stas Bekman <st...@stason.org>.
Ken Simpson wrote:
> Here's the solution to the blocking sockets problem discussed earlier
> on the list -- straight from the APR folks. I have tested this
> solution and it works.
Good. But now you need to make sure that it's applied to APR.
> ----- Forwarded message from Joe Orton <jo...@redhat.com> -----
>
> From: Joe Orton <jo...@redhat.com>
> Date: Fri, 27 Aug 2004 07:16:05 +0100
> To: Ken Simpson <ks...@larch.mailchannels.com>
> Cc: dev@apr.apache.org
> Subject: Re: Unable to set sockets to non blocking on OpenBSD
> User-Agent: Mutt/1.4.1i
>
> 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])
>
>
>
> ----- End forwarded message -----
>
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org