From: Dirk-Willem van Gulik Date: Wed, 29 May 2002 17:53:24 +0000 (+0000) Subject: iFrom david: X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=3429c3e82ef54006591f3bd2134d9c1112e8fb5a;p=thirdparty%2Fapache%2Fhttpd.git iFrom david: Date: Wed, 29 May 2002 09:22:58 -0600 From: David McCreedy 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 Reviewed by: Dirk-Willem van Gulik git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@95358 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/os/tpf/os.c b/src/os/tpf/os.c index 370c2a2c3b2..b7aefc19e1a 100644 --- a/src/os/tpf/os.c +++ b/src/os/tpf/os.c @@ -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) {