dgaudet     99/05/06 17:38:13

  Modified:    src      CHANGES
               src/main http_main.c
  Log:
  loop around on EINTR from semop()
  
  Revision  Changes    Path
  1.1352    +3 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1351
  retrieving revision 1.1352
  diff -u -r1.1351 -r1.1352
  --- CHANGES   1999/05/07 00:16:06     1.1351
  +++ CHANGES   1999/05/07 00:38:05     1.1352
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.7
   
  +  *) It's OK for a semop to return EINTR, just loop around and try
  +     again.  [Dean Gaudet]
  +
     *) Fix configuration engine re-entrant hangups, which solve a
        handful of problems seen with mod_perl <Perl> configuration sections
        [Salvador Ortiz Garcia <[EMAIL PROTECTED]>]
  
  
  
  1.436     +10 -6     apache-1.3/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v
  retrieving revision 1.435
  retrieving revision 1.436
  diff -u -r1.435 -r1.436
  --- http_main.c       1999/05/05 20:42:58     1.435
  +++ http_main.c       1999/05/07 00:38:11     1.436
  @@ -741,17 +741,21 @@
   
   static void accept_mutex_on(void)
   {
  -    if (semop(sem_id, &op_on, 1) < 0) {
  -     perror("accept_mutex_on");
  -     clean_child_exit(APEXIT_CHILDFATAL);
  +    while (semop(sem_id, &op_on, 1) < 0) {
  +     if (errno != EINTR) {
  +         perror("accept_mutex_on");
  +         clean_child_exit(APEXIT_CHILDFATAL);
  +     }
       }
   }
   
   static void accept_mutex_off(void)
   {
  -    if (semop(sem_id, &op_off, 1) < 0) {
  -     perror("accept_mutex_off");
  -     clean_child_exit(APEXIT_CHILDFATAL);
  +    while (semop(sem_id, &op_off, 1) < 0) {
  +     if (errno != EINTR) {
  +         perror("accept_mutex_off");
  +         clean_child_exit(APEXIT_CHILDFATAL);
  +     }
       }
   }
   
  
  
  

Reply via email to