httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <hart...@hyperreal.com>
Subject NEXTSTEP bug fixes (fwd)
Date Tue, 29 Aug 1995 05:55:31 GMT

first, I responded to this guy with a thank you.

If it's not too late, this might count as a showstopper bug that needs
fixing.

this is what caused me to fill someones filesystem with errorlog entries
a few weeks back.

I think everything here is #def'ed on NeXT, so there shouldn't be any
side effects.

I think it's worth putting in the next release, but not worth getting into
an argument about deadlines and stuff, so I'll only suggest we add it.

Forwarded message:
> From bp@webcrawler.com  Mon Aug 28 10:59:44 1995
> Message-Id: <9508281759.AA09528@webcrawler.com>
> Content-Type: text/plain
> Mime-Version: 1.0 (NeXT Mail 3.3 v118.2)
> From: Brian Pinkerton <bp@webcrawler.com>
> Date: Mon, 28 Aug 95 10:59:39 -0700
> To: apache-bugs@apache.org
> Subject: NEXTSTEP bug fixes
> 
> Hey folks,
> 
> Decided to start the process upgrading the WebCrawler servers to the latest  
> Apache stuff (we're running 0.6.5 now).  Good job!  0.8.11 is a great piece  
> of code: fast, reliable, and way easier to hack. :)
> 
> In the process of adding our custom WebCrawler modules, I fixed up a few  
> NEXT-related bugs.  Other than compile-time warnings, the main problem was  
> that killing the server didn't have the desired effect: the parent died, and  
> the kids kept running in a tight loop around accept().  Fixing this turned  
> out to be easy: NEXTSTEP still has the old 4.3BSD-style setpgrp interface.   
> Context diffs are included below...
> 
> cheers,
> bri
> 
> 
> diff -cr /dolphin/Projects/apache_0.8.11/src/conf.h apache/conf.h
> *** /dolphin/Projects/apache_0.8.11/src/conf.h	Tue Aug 22 18:16:05 1995
> --- apache/conf.h	Mon Aug 28 08:59:00 1995
> ***************
> *** 134,141 ****
>   #define tolower(c) (isupper(c) ? tolower(c) : c)
> 
>   #elif defined(NEXT)
>   typedef unsigned short mode_t;
> - #define BSD
>   #undef NO_KILLPG
>   #define NO_SETSID
>   #define NEED_STRDUP
> --- 134,141 ----
>   #define tolower(c) (isupper(c) ? tolower(c) : c)
> 
>   #elif defined(NEXT)
> + #include <libc.h>
>   typedef unsigned short mode_t;
>   #undef NO_KILLPG
>   #define NO_SETSID
>   #define NEED_STRDUP
> ***************
> *** 173,179 ****
>   #define STDIN_FILENO  0
>   #define STDOUT_FILENO 1
>   #define STDERR_FILENO 2
> ! #define waitpid(a,b,c) wait4(a,b,c,NULL)
>   typedef int pid_t;
>   #define JMP_BUF jmp_buf
> 
> --- 173,179 ----
>   #define STDIN_FILENO  0
>   #define STDOUT_FILENO 1
>   #define STDERR_FILENO 2
> ! #define waitpid(a,b,c) wait4(a,(union wait *)b,c,NULL)
>   typedef int pid_t;
>   #define JMP_BUF jmp_buf
> 
> diff -cr /dolphin/Projects/apache_0.8.11/src/http_main.c apache/http_main.c
> *** /dolphin/Projects/apache_0.8.11/src/http_main.c	Tue Aug 22 18:16:10 1995
> --- apache/http_main.c	Mon Aug 28 10:50:42 1995
> ***************
> *** 495,501 ****
> --- 495,505 ----
> 
>       signal (SIGALRM, longjmp_out_of_alarm);
>       alarm(1);
> + #if defined(NEXT)
> +     wait_or_timeout_retval = wait((union wait *)status);
> + #else
>       wait_or_timeout_retval = wait(status);
> + #endif
>       alarm(0);
>       return wait_or_timeout_retval;
>   }
> ***************
> *** 524,534 ****
> --- 528,546 ----
>           exit(1);
>       }
>   #else
> + #if defined(NEXT)
> +     if(setpgrp(0,getpid()) == -1 || (pgrp = getpgrp(0)) == -1) {
> +         fprintf(stderr,"httpd: setpgrp or getpgrp failed\n");
> +         perror("setpgrp");
> +         exit(1);
> +     }
> + #else
>       if((pgrp=setpgrp(getpid(),0)) == -1) {
>           fprintf(stderr,"httpd: setpgrp failed\n");
>           perror("setpgrp");
>           exit(1);
>       }
> + #endif
>   #endif
>   }
> 


Mime
View raw message