mirror of
https://github.com/nginx/nginx.git
synced 2026-09-01 02:58:40 +00:00
fix r2731 for Win32
This commit is contained in:
parent
890467c1c4
commit
19a0e6e32e
1 changed files with 8 additions and 2 deletions
|
|
@ -207,6 +207,14 @@ ngx_log_stderr(const char *fmt, ...)
|
|||
|
||||
ngx_linefeed(p);
|
||||
|
||||
#if (NGX_WIN32)
|
||||
|
||||
if (ngx_stderr_fileno == NULL) {
|
||||
ngx_stderr_fileno = GetStdHandle(STD_ERROR_HANDLE);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
(void) ngx_write_fd(ngx_stderr_fileno, errstr, p - errstr);
|
||||
}
|
||||
|
||||
|
|
@ -219,8 +227,6 @@ ngx_log_init(void)
|
|||
|
||||
#if (NGX_WIN32)
|
||||
|
||||
ngx_stderr_fileno = GetStdHandle(STD_ERROR_HANDLE);
|
||||
|
||||
ngx_stderr.fd = ngx_open_file((u_char *) NGX_ERROR_LOG_PATH,
|
||||
NGX_FILE_APPEND,
|
||||
NGX_FILE_CREATE_OR_OPEN,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue