Patchwork [1/1] apr: set flag of inheriting O_NONBLOCK as no

login
register
mail settings
Submitter rongqing.li@windriver.com
Date Nov. 29, 2012, 6:36 a.m.
Message ID <cb54673a133a17e2be78912491a696de62c6e431.1354170824.git.rongqing.li@windriver.com>
Download mbox | patch
Permalink /patch/39851/
State New
Headers show

Comments

rongqing.li@windriver.com - Nov. 29, 2012, 6:36 a.m.
From: "Roy.Li" <rongqing.li@windriver.com>

The flag ac_cv_o_nonblock_inherited is always set to yes in cross compiling
environment. This flag is intended to think the socket, returned from
accept(), inherit file status flags such as O_NONBLOCK from the listening
socket, but socket never inherits file status from the listening socket on
Linux (more information to man accept).

If ac_cv_o_nonblock_inherited is set to yes on Linux, clients can not access the
same ip address(URL) with Apache web server via http(port 80) and https(port443)
without redirection

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
---
 meta/recipes-support/apr/apr_1.4.6.bb |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Ross Burton - Nov. 29, 2012, 7:08 a.m.
On Thursday, 29 November 2012 at 06:36, rongqing.li@windriver.com wrote:
> The flag ac_cv_o_nonblock_inherited is always set to yes in cross compiling
> environment. This flag is intended to think the socket, returned from
> accept(), inherit file status flags such as O_NONBLOCK from the listening
> socket, but socket never inherits file status from the listening socket on
> Linux (more information to man accept).

meta/site/powerpc32-linux already sets this to no, so if this Linux-wide behaviour it should be moved to site/common-linux instead of being specific to apr.

Ross
rongqing.li@windriver.com - Nov. 29, 2012, 8:43 a.m.
On 2012?11?29? 15:08, Ross Burton wrote:
> On Thursday, 29 November 2012 at 06:36, rongqing.li@windriver.com wrote:
>> The flag ac_cv_o_nonblock_inherited is always set to yes in cross compiling
>> environment. This flag is intended to think the socket, returned from
>> accept(), inherit file status flags such as O_NONBLOCK from the listening
>> socket, but socket never inherits file status from the listening socket on
>> Linux (more information to man accept).
>
> meta/site/powerpc32-linux already sets this to no, so if this Linux-wide behaviour it should be moved to site/common-linux instead of being specific to apr.
>
> Ross

You reminds me, powerpc does not have this bug, but other arch have.

 From man accept(), this is a Linux-wide behaviour, and it should be
put to sit/common-linux.

-Roy

>
>

Patch

diff --git a/meta/recipes-support/apr/apr_1.4.6.bb b/meta/recipes-support/apr/apr_1.4.6.bb
index 896f79f..3e7b0a9 100644
--- a/meta/recipes-support/apr/apr_1.4.6.bb
+++ b/meta/recipes-support/apr/apr_1.4.6.bb
@@ -9,7 +9,7 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=0c35ff3c4c83b89d2f076e315caac28b \
 
 BBCLASSEXTEND = "native"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \
            file://configure_fixes.patch \
@@ -22,6 +22,7 @@  SRC_URI[sha256sum] = "9b635e60feb163e6fc6c375721f71f44d7e26d6b9cd52f6b86b04e65d2
 inherit autotools lib_package binconfig multilib_header
 
 OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
+EXTRA_OECONF = "ac_cv_o_nonblock_inherited=no"
 
 do_configure_prepend() {
 	cd ${S}