Re: How to debug a fast-cgi...

Mark Brown (
Wed, 28 Aug 1996 14:20:45 -0400

Message-Id: <>
Subject: Re: How to debug a fast-cgi... 
In-Reply-To: <> 
Date: Wed, 28 Aug 1996 14:20:45 -0400
From: Mark Brown <>

Thies Arntzen asks:

    could one of you tell me how i can debug a fast-cgi.
    i tried to attach with gdb, but after gdb attached
    i couldn't continue, because the FCGI_Accept would't
    work any more.... using AIX 4.1

Let's see ... I'm guessing that what's happened is that
the call to accept() on line 2117 of fcgiapp.c is returning
-1 with errno = EINTR, and the fcgiapp is not prepared to retry.

You should be able to tell if this is what's happening
by poking around with gdb.  If my guess is correct,
you could change

            reqDataPtr->socket = accept(FCGI_LISTENSOCK_FILENO,
                    (struct sockaddr *) &sa.un, &clilen);


            for(;;) {
                reqDataPtr->socket = accept(FCGI_LISTENSOCK_FILENO,
                        (struct sockaddr *) &sa.un, &clilen);
                if(reqDataPtr->socket != -1 || errno != EINTR) {

and see if that doesn't fix it.

If my guess is wrong, please poke around with gdb and tell us
why the application won't continue after you've attached a debugger.