httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject Re: Calling non-portable functions in HTTPD...
Date Wed, 16 Jan 2002 18:53:12 GMT
On Mon, Jan 14, 2002 at 02:27:15PM -0700, Brad Nicholes wrote:
> In the file log.c, ap_open_logs() makes the following call:
> 
>     /* note that stderr may still need to be replaced with something
>      * because it points to the old error log, or back to the tty
>      * of the submitter.
>      */
>     if (replace_stderr && freopen("/dev/null", "w", stderr) == NULL) {
>         ap_log_error(APLOG_MARK, APLOG_CRIT, errno, s_main,
>                      "unable to replace stderr with /dev/null");
>     }
> 
> The call to freopen ("/dev/null"...) appears to be a non-portable
> function call.  Shouldn't freopen() have been APR'ized into something
> like apr_file_reopen() with the first parameter being defined as 
> #define APR_BIT_BUCKET_FILE "/my/platform/entry/here"?  Right now this
> doesn't work on NetWare and I can't fix it without putting an #ifdef
> NETWARE into HTTPD which is bad.  

If freopen() is not portable and netware has a different /dev/null
analog, then I agree this is broken.

-aaron

Mime
View raw message