]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
iFrom david:
authorDirk-Willem van Gulik <dirkx@apache.org>
Wed, 29 May 2002 17:53:24 +0000 (17:53 +0000)
committerDirk-Willem van Gulik <dirkx@apache.org>
Wed, 29 May 2002 17:53:24 +0000 (17:53 +0000)
        Date: Wed, 29 May 2002 09:22:58 -0600
        From: David McCreedy <McCreedy@us.ibm.com>
        Subject: [PATCH] TPF InetD change to src/os/tpf/os.c

        This patch reworks some of the checks in TPF's os_check_server function
        to better accommodate TPF's Internet Daemon processing.

        David McCreedy

PR:
Obtained from: mailing list
Submitted by: David McCreedy <McCreedy@us.ibm.com>
Reviewed by: Dirk-Willem van Gulik <dirkx@apache.org>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@95358 13f79535-47bb-0310-9956-ffa450edef68

src/os/tpf/os.c

index 370c2a2c3b23d5d6cbf5c7e9033502e1f7d9661c..b7aefc19e1aaeb0aa7899e0b525959e4f79822bb 100644 (file)
@@ -448,25 +448,25 @@ void ap_tpf_zinet_checks(int standalone,
 int os_check_server(char *server) {
     int *current_acn;
 
-    if (zinet_model == INETD_IDCF_MODEL_NOLISTEN) {
-        /* if NOLISTEN model, check with ZINET for status */
-        if (inetd_getServerStatus(server) == INETD_SERVER_STATUS_INACTIVE) {
-            return 1;
-        }
-        /* and check that program activation number hasn't changed */
+    /* check that the program activation number hasn't changed */
         current_acn = (int *)cinfc_fast(CINFC_CMMACNUM);
         if (ecbp2()->ce2acn != *current_acn) {
-            return 1;
+        return 1;  /* shutdown */
         }
 
-    } else {
-        /* if DAEMON model, just make sure parent is still around */
+    /* check our InetD status */
+    if (inetd_getServerStatus(server) != INETD_SERVER_STATUS_ACTIVE) {
+        return 1;  /* shutdown */
+    }
+
+    /* if DAEMON model, make sure parent is still around */
+    if (zinet_model == INETD_IDCF_MODEL_DAEMON) {
         if (getppid() == 1) {
-            return 1;
+            return 1;  /* shutdown */
         }
     }
 
-    return 0;
+    return 0;  /* keep on running... */
 }
 
 void os_note_additional_cleanups(pool *p, int sd) {