apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/threadproc/unix procsup.c
Date Mon, 08 Apr 2002 13:08:18 GMT
trawick     02/04/08 06:08:18

  Modified:    threadproc/unix procsup.c
  Log:
  apr_proc_detach():
  stop working so hard to figure out the process group id; we
  don't use that information (logic was inherited from Apache 1.3,
  which does use the information)
  
  Revision  Changes    Path
  1.36      +5 -10     apr/threadproc/unix/procsup.c
  
  Index: procsup.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/unix/procsup.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- procsup.c	13 Mar 2002 20:39:30 -0000	1.35
  +++ procsup.c	8 Apr 2002 13:08:18 -0000	1.36
  @@ -57,7 +57,6 @@
   APR_DECLARE(apr_status_t) apr_proc_detach(int daemonize)
   {
       int x;
  -    pid_t pgrp;
   
       chdir("/");
   #if !defined(MPE) && !defined(OS2) && !defined(TPF) && !defined(BEOS)
  @@ -77,21 +76,17 @@
   #endif
   
   #ifdef HAVE_SETSID
  -    if ((pgrp = setsid()) == -1) {
  +    if (setsid() == -1) {
           return errno;
       }
   #elif defined(NEXT) || defined(NEWSOS)
  -    if (setpgrp(0, getpid()) == -1 || (pgrp = getpgrp(0)) == -1) {
  +    if (setpgrp(0, getpid()) == -1) {
           return errno;
       }
  -#elif defined(OS2) || defined(TPF)
  -    /* OS/2 don't support process group IDs */
  -    pgrp = getpid();
  -#elif defined(MPE)
  -    /* MPE uses negative pid for process group */
  -    pgrp = -getpid();
  +#elif defined(OS2) || defined(TPF) || defined(MPE)
  +    /* do nothing */
   #else
  -    if ((pgrp = setpgid(0, 0)) == -1) {
  +    if (setpgid(0, 0) == -1) {
           return errno;
       }
   #endif
  
  
  

Mime
View raw message