You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by rb...@covalent.net on 2000/07/31 17:18:28 UTC

Re: cvs commit: apache-2.0/src/support ab.c

On 31 Jul 2000 trawick@locus.apache.org wrote:

> trawick     00/07/31 07:50:55
> 
>   Modified:    src      CHANGES
>                src/support ab.c
>   Log:
>   Don't use perror() to report the failure of an APR function.
>   Introduce apr_err() for that purpose.

Why shouldn't we use perror to report the failure of an APR function?
Underneath APR, we are using standard Unix calls.  I would think perror
would give us a bit more information.  Is it not portable?

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: cvs commit: apache-2.0/src/support ab.c

Posted by rb...@covalent.net.
On 31 Jul 2000, Jeff Trawick wrote:

> rbb@covalent.net writes:
> 
> > On 31 Jul 2000 trawick@locus.apache.org wrote:
> > 
> > > trawick     00/07/31 07:50:55
> > > 
> > >   Modified:    src      CHANGES
> > >                src/support ab.c
> > >   Log:
> > >   Don't use perror() to report the failure of an APR function.
> > >   Introduce apr_err() for that purpose.
> > 
> > Why shouldn't we use perror to report the failure of an APR function?
> > Underneath APR, we are using standard Unix calls.  I would think perror
> > would give us a bit more information.  Is it not portable?
> 
> perror() is portable, but not in combination with APR.
> 
> Consider Win32...  (ab works on Windows)
> 
> perror() on Windows (like everywhere else) assumes that errno has the
> error code; APR on Windows uses functions which don't set errno.
> Thus, perror() probably won't display the correct information.

Ahhh.....  That makes sense.  Thanks

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: cvs commit: apache-2.0/src/support ab.c

Posted by Jeff Trawick <tr...@bellsouth.net>.
rbb@covalent.net writes:

> On 31 Jul 2000 trawick@locus.apache.org wrote:
> 
> > trawick     00/07/31 07:50:55
> > 
> >   Modified:    src      CHANGES
> >                src/support ab.c
> >   Log:
> >   Don't use perror() to report the failure of an APR function.
> >   Introduce apr_err() for that purpose.
> 
> Why shouldn't we use perror to report the failure of an APR function?
> Underneath APR, we are using standard Unix calls.  I would think perror
> would give us a bit more information.  Is it not portable?

perror() is portable, but not in combination with APR.

Consider Win32...  (ab works on Windows)

perror() on Windows (like everywhere else) assumes that errno has the
error code; APR on Windows uses functions which don't set errno.
Thus, perror() probably won't display the correct information.

-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Re: cvs commit: apache-2.0/src/support ab.c

Posted by Tony Finch <do...@dotat.at>.
rbb@covalent.net wrote:
>
>I would think perror would give us a bit more information.

It doesn't.

Tony.
-- 
en oeccget g mtcaa    f.a.n.finch
v spdlkishrhtewe y    dot@dotat.at
eatp o v eiti i d.    fanf@covalent.net