You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Justin Erenkrantz <je...@apache.org> on 2002/05/14 01:04:55 UTC

Re: cvs commit: apache-1.3/src/main http_main.c

On Mon, May 13, 2002 at 11:00:09PM -0000, dirkx@apache.org wrote:
>   Index: http_main.c
>   ===================================================================
>   RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v
>   retrieving revision 1.580
>   retrieving revision 1.581
>   diff -u -r1.580 -r1.581
>   --- http_main.c	22 Apr 2002 18:23:19 -0000	1.580
>   +++ http_main.c	13 May 2002 23:00:07 -0000	1.581
<snip>
>   @@ -3374,19 +3377,24 @@
>        !defined(BONE)
>    /* Don't detach for MPE because child processes can't survive the death of
>       the parent. */
>   -    if ((x = fork()) > 0)
>   -	exit(0);
>   -    else if (x == -1) {
>   -	perror("fork");
>   -	fprintf(stderr, "%s: unable to fork new process\n", ap_server_argv0);
>   -	exit(1);
>   +    if (do_detach) {
>   +        if ((x = fork()) > 0)
>   +            exit(0);
>   +        else if (x == -1) {
>   +            perror("fork");
>   +	    fprintf(stderr, "%s: unable to fork new process\n", ap_server_argv0);
>   +	    exit(1);
>   +        }
>   +        RAISE_SIGSTOP(DETACH);
>        }
>   -    RAISE_SIGSTOP(DETACH);
>    #endif
>    #ifndef NO_SETSID
>   -    if ((pgrp = setsid()) == -1) {
>   +    if (pgrp = setsid()) == -1) {

Without compiling this, I'd guess that you're missing a (.  This
portion should be reverted.  -- justin