Oups, need to clarify. On 18.01.2009 16:48, Rainer Jung wrote:
During startup or after restart we go through ap_open_logs() and thus
restart -> restart of httpd
after startup or restart, the write side of the original pl is closed and the pipe is written to via the duped FD in stderr. More precisely ap_open_logs() calls open_error_log(), which returns ap_piped_log_write_fd(pl) in s->error_log, and after return ap_open_logs() calls apr_file_close(s_main->error_log) is s==s_main.
is -> if
When killing the logger, piped_log_maintenance() gets called. It can now not simply use pl, because the write side has been closed before in ap_open_logs(). I tried to keep the startup behaviour during restart, so I dup stderr to
restart -> restart of a killed logger
the write side in the maintenance function, spawn and close the write side again.