httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@ai.mit.edu (Robert S. Thau)
Subject Re: So, where do we stand?
Date Thu, 03 Aug 1995 08:51:04 GMT
  TransferLog | program
  does not work; apache hangs on a restart.

[ goes to directory with "one-of-everything" (Virtual Hosts, Transferlog |,
  etc.) test setup ]
[ kicks off server ]
[ tries restart ]
[ ooops ]

... probably not.  Here's a patch, which seems to cure the problem; I
only hope it doesn't introduce anything worse:

*** /com/web/src/apache_0.8.6/src/http_main.c	Wed Aug  2 20:38:45 1995
--- http_main.c	Thu Aug  3 08:38:05 1995
***************
*** 423,432 ****
  void reclaim_child_processes ()
  {
      int i, status;
  
      sync_scoreboard_image();
!     for (i = 0; i < HARD_SERVER_MAX; ++i)
! 	waitpid (scoreboard_image[i].pid, &status, 0);
  }
  
  /* Finally, this routine is used by the caretaker process to wait for
--- 423,437 ----
  void reclaim_child_processes ()
  {
      int i, status;
+     int my_pid = getpid();
  
      sync_scoreboard_image();
!     for (i = 0; i < HARD_SERVER_MAX; ++i) {
! 	int pid = scoreboard_image[i].pid;
! 
! 	if (pid != my_pid && pid != 0)
! 	    waitpid (scoreboard_image[i].pid, &status, 0);
!     }
  }
  
  /* Finally, this routine is used by the caretaker process to wait for

Mime
View raw message