>Number: 523 >Category: config >Synopsis: improve error log/stderr usage >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache (Apache HTTP Project) >State: open >Class: change-request >Submitter-Id: apache >Arrival-Date: Thu May 1 18:10:01 1997 >Originator: [EMAIL PROTECTED] >Organization: apache >Release: all >Environment: all >Description: The configuration file is read twice for good reasons. Let's add another good reason. On the first read of the config file, let stderr point at the original stderr. But during detach() redirect stderr to the error_log. Immediately on program startup reopen stdin/stdout to /dev/null.
This should clean up the startup behaviour such that you can see immediately if your config has errors (and it'll also be in the error_log if it wasn't fatal). But then once it detaches your stderr is freed up -- which means that httpd won't be holding onto a tty (or worse, if you're restarting it via rsh it won't hold onto the network pipe). At the moment you essentially have to redirect in/out/err to /dev/null and then re-run the server without redirection to find config errors if it doesn't start cleanly. This is hard to automate. >How-To-Repeat: >Fix: >Audit-Trail: >Unformatted:
