You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by di...@apache.org on 2002/05/29 19:53:24 UTC

cvs commit: apache-1.3/src/os/tpf os.c

dirkx       02/05/29 10:53:24

  Modified:    src/os/tpf os.c
  Log:
  iFrom david:
  
          Date: Wed, 29 May 2002 09:22:58 -0600
          From: David McCreedy <Mc...@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
  
  Obtained from: mailing list
  Submitted by: David McCreedy <Mc...@us.ibm.com>
  Reviewed by: Dirk-Willem van Gulik <di...@apache.org>
  
  Revision  Changes    Path
  1.18      +11 -11    apache-1.3/src/os/tpf/os.c
  
  Index: os.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/tpf/os.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- os.c	19 May 2002 04:55:39 -0000	1.17
  +++ os.c	29 May 2002 17:53:24 -0000	1.18
  @@ -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) {