httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brad Nicholes" <>
Subject Calling non-portable functions in HTTPD...
Date Mon, 14 Jan 2002 21:27:15 GMT
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.  


View raw message