/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "httpd.h"
#include "http_log.h"
#include "mpm_winnt.h"
#include "apr_strings.h"
#include "apr_lib.h"
#include "apr_portable.h"
#include "ap_regkey.h"
{
apr_pool_t *p;
errarg[0] = "The Apache service named";
/* What are we going to do in here, bail on the user? not. */
"SYSTEM\\CurrentControlSet\\Services\\"
"EventLog\\Application\\Apache Service",
== APR_SUCCESS)
{
/* The stock message file */
"%SystemRoot%\\System32\\netmsg.dll",
AP_REGKEY_EXPAND, p);
}
{
{
++errmsg;
{
--errmsg;
}
*errmsg = '\0';
/* Generic message: '%1 %2 %3 %4 %5 %6 %7 %8 %9'
* The event code in netmsg.dll is 3299
*/
}
}
}
"Win32 error %lu reading stderr pipe stream\r\n",
GetLastError());
}
apr_pool_destroy(p);
return 0;
}
void mpm_nt_eventlog_stderr_flush(void)
{
if (cleanup_thread) {
}
}
{
/* Create a pipe to send stderr messages to the system error log.
*
* _dup2() duplicates the write handle inheritable for us.
*/
if ((apr_file_open_stderr(&stderr_file, p)
== APR_SUCCESS)
== APR_SUCCESS))
/* The code above _will_ corrupt the StdHandle...
* and we must do so anyways. We set this up only
* after we initialized the posix stderr API.
*/
}