Received: (qmail 16670 invoked by uid 2012); 20 Oct 1997 21:33:47 -0000 Message-Id: <19971020213347.16669.qmail@hyperreal.org> Date: 20 Oct 1997 21:33:47 -0000 From: Tom Hughes Reply-To: thh@cyberscience.com To: apbugs@hyperreal.org Subject: Server fails to bind port when restarting after SIGHUP X-Send-Pr-Version: 3.2 >Number: 1282 >Category: os-unixware >Synopsis: Server fails to bind port when restarting after SIGHUP >Confidential: no >Severity: critical >Priority: medium >Responsible: apache >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Mon Oct 20 14:40:01 PDT 1997 >Last-Modified: Wed Jan 21 16:01:53 PST 1998 >Originator: thh@cyberscience.com >Organization: >Release: 1.3b2 >Environment: Unixware 1 >Description: Unixware 1 (but not Unixware 2) seems to have the same problem as Solaris versions prior to 2.6 where restarting with SIGHUP gives a 'can't bind port' error. Enabling the WORKAROUND_SOLARIS_BUG fix in http_main.c seems to fix it. >How-To-Repeat: Use kill -HUP on a server running on Unixware 1. >Fix: Apply this patch in the src directory: *** Configure.orig Mon Oct 20 11:52:40 1997 --- Configure Mon Oct 20 11:52:44 1997 ************** >Audit-Trail: State-Changed-From-To: open-analyzed State-Changed-By: marc State-Changed-When: Fri Oct 31 22:27:13 PST 1997 State-Changed-Why: The patch you appended did not make it; could you include it in a reply to this message? From: Marc Slemko To: Apache bugs database Cc: Subject: Re: os-unixware/1282: Server fails to bind port when restarting after SIGHUP (fwd) Date: Mon, 3 Nov 1997 09:06:48 -0700 (MST) ---------- Forwarded message ---------- Date: 03 Nov 1997 08:30:56 +0000 From: Tom Hughes To: marc@hyperreal.org Cc: apache-bugdb@apache.org, marc@apache.org Subject: Re: os-unixware/1282: Server fails to bind port when restarting after SIGHUP In article <19971101062713.18593.qmail@hyperreal.org>, marc@hyperreal.org writes: > Synopsis: Server fails to bind port when restarting after SIGHUP > State-Changed-From-To: open-analyzed > State-Changed-By: marc > State-Changed-When: Fri Oct 31 22:27:13 PST 1997 > State-Changed-Why: > The patch you appended did not make it; could you > include it in a reply to this message? Here it is. This is actually an enhanced version that also produces a better build on Unixware 1 by building -DUW instead of -DSVR4 which allows various extra features like shared memory scoreboards and mmaped file serving on Unixware 1. It also adds -lgen on UW2 which is needed for syslog (that has alredy been reported in a separate PR I think). I've built servers with this patch on both 1.1 and 2.1 and they seem to be working fine and doing everything asked of them. *** Configure.orig Mon Oct 20 11:52:40 1997 --- Configure Tue Oct 21 10:14:00 1997 *************** *** 391,414 **** *-unixware1) DEF_WANTHSREGEX=yes OS='Unixware' ! CFLAGS="$CFLAGS -DSVR4 -DNO_LINGCLOSE" LIBS="$LIBS -lsocket -lnsl -lcrypt" ;; *-unixware2) DEF_WANTHSREGEX=yes OS='Unixware' ! CFLAGS="$CFLAGS -DSVR4 -DNO_LINGCLOSE" ! LIBS="$LIBS -lsocket -lnsl -lcrypt" ;; *-unixware211) OS='Unixware 2.1.1' ! CFLAGS="$CFLAGS -DUW" ! LIBS="$LIBS -lsocket -lnsl -lcrypt" ;; *-unixware212) OS='Unixware 2.1.2' ! CFLAGS="$CFLAGS -DUW" ! LIBS="$LIBS -lsocket -lnsl -lcrypt" DBM_LIB="" ;; maxion-*-sysv4*) --- 391,414 ---- *-unixware1) DEF_WANTHSREGEX=yes OS='Unixware' ! CFLAGS="$CFLAGS -DUW=100" LIBS="$LIBS -lsocket -lnsl -lcrypt" ;; *-unixware2) DEF_WANTHSREGEX=yes OS='Unixware' ! CFLAGS="$CFLAGS -DUW=200" ! LIBS="$LIBS -lsocket -lnsl -lcrypt -lgen" ;; *-unixware211) OS='Unixware 2.1.1' ! CFLAGS="$CFLAGS -DUW=211" ! LIBS="$LIBS -lsocket -lnsl -lcrypt -lgen" ;; *-unixware212) OS='Unixware 2.1.2' ! CFLAGS="$CFLAGS -DUW=212" ! LIBS="$LIBS -lsocket -lnsl -lcrypt -lgen" DBM_LIB="" ;; maxion-*-sysv4*) *** main/conf.h.orig Tue Oct 21 10:26:40 1997 --- main/conf.h Tue Oct 21 10:29:14 1997 *************** *** 412,419 **** --- 412,424 ---- #define HAVE_SYS_SELECT_H #define HAVE_SYS_RESOURCE_H #include + #if UW >= 200 #define _POSIX_SOURCE + #endif #define NET_SIZE_T size_t + #if UW < 211 + #define USE_FCNTL_SERIALIZED_ACCEPT + #endif #define HAVE_SYSLOG #elif defined(DGUX) *** main/http_main.c.orig Mon Oct 20 11:54:00 1997 --- main/http_main.c Tue Oct 21 10:14:41 1997 *************** *** 2287,2292 **** --- 2287,2296 ---- #define WORKAROUND_SOLARIS_BUG #endif + #if defined (UW) && UW < 200 + #define WORKAROUND_SOLARIS_BUG + #endif + #ifndef WORKAROUND_SOLARIS_BUG s = ap_slack(s, AP_SLACK_HIGH); -- Tom Hughes : thh@cyberscience.com : tom@compton.demon.co.uk Software Engineer, Cyberscience Corporation Rawdon House, High Street, Hoddesdon, Hertfordshire EN11 8BD ... Feet Smell? Nose Run? Hey, you're upside down! State-Changed-From-To: analyzed-closed State-Changed-By: dgaudet State-Changed-When: Wed Jan 21 16:01:53 PST 1998 State-Changed-Why: Thanks for the patch, it has been applied with slight modifications to 1.3b4-dev. The modification is that another user has found that even unixware 2.1.2 requires USE_FCNTL_SERIALIZED_ACCEPT when run on an SMP box. So it's enabled for all versions of unixware now. Dean >Unformatted: