This patch reworks some of the checks in TPF's os_check_server function
to better accommodate TPF's Internet Daemon processing.
David McCreedy
Index: apache-1.3/src/os/tpf/os.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/os/tpf/os.c,v
retrieving revision 1.17
diff -u -d -b -r1.17 os.c
--- apache-1.3/src/os/tpf/os.c 19 May 2002 04:55:39 -0000 1.17
+++ apache-1.3/src/os/tpf/os.c 29 May 2002 14:59:53 -0000
@@ -448,25 +448,25 @@
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) {