You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Marc Slemko <ma...@znep.com> on 1997/12/12 20:52:42 UTC

Re: suexec/1543: suexec.c -- Does not report exec failure reasons (fwd)

Why would any compiler do this?  I'm no compiler expert, but I fail to see
how any sane compiler would do this.

---------- Forwarded message ----------
Date: Fri, 12 Dec 97 11:41:44 PST
From: "M. D. Parker" <md...@netcom.com>
To: Marc Slemko <ma...@znep.com>
Cc: apbugs@hyperreal.org
Subject: Re: suexec/1543: suexec.c -- Does not report exec failure reasons

Problem with the patch seems to be in the evaluation of the parameters
pushed onto the stack before the call.  It seems that at least in my gcc
implementation, the value of errno gets changed before being printed out,
but the strerror() call reports the right textual error.

Suggest that you change the patch as follows:

.
.
.
int errx;	/* error numb holder */
.
.
.
        errx=errno;
    log_err("(%d)%s: exec failed (%s)\n", errx, strerror(errx), cmd);

Mike


Re: suexec/1543: suexec.c -- Does not report exec failure reasons (fwd)

Posted by Martin Kraemer <Ma...@mch.sni.de>.
On Sat, Dec 13, 1997 at 10:07:25PM +0000, Ben Laurie wrote:
> Marc Slemko wrote:
> > 
> > Why would any compiler do this?  I'm no compiler expert, but I fail to see
> > how any sane compiler would do this.
> 
> I don't see how this can be to do with the compiler. In fact, I don't
> even understand the bug report.
I guess that, in a threaded environment, errno is not "extern int" but
a function (especially when inside a thread). Maybe this function doesn't
guarantee to deliver the same result twice?!?!
Anyway, this is a compiler implementation error, not an apache error.

    Martin
-- 
| S I E M E N S |  <Ma...@mch.sni.de>  |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request

Re: suexec/1543: suexec.c -- Does not report exec failure reasons (fwd)

Posted by Ben Laurie <be...@algroup.co.uk>.
Marc Slemko wrote:
> 
> Why would any compiler do this?  I'm no compiler expert, but I fail to see
> how any sane compiler would do this.

I don't see how this can be to do with the compiler. In fact, I don't
even understand the bug report.

Cheers,

Ben.

> 
> ---------- Forwarded message ----------
> Date: Fri, 12 Dec 97 11:41:44 PST
> From: "M. D. Parker" <md...@netcom.com>
> To: Marc Slemko <ma...@znep.com>
> Cc: apbugs@hyperreal.org
> Subject: Re: suexec/1543: suexec.c -- Does not report exec failure reasons
> 
> Problem with the patch seems to be in the evaluation of the parameters
> pushed onto the stack before the call.  It seems that at least in my gcc
> implementation, the value of errno gets changed before being printed out,
> but the strerror() call reports the right textual error.
> 
> Suggest that you change the patch as follows:
> 
> .
> .
> .
> int errx;       /* error numb holder */
> .
> .
> .
>         errx=errno;
>     log_err("(%d)%s: exec failed (%s)\n", errx, strerror(errx), cmd);
> 
> Mike

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |Apache-SSL author
A.L. Digital Ltd,     |http://www.algroup.co.uk/Apache-SSL
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache