Klaus Demo nginx / 42c32b7
Core: added support for writing to stdout. Vladimir Homutov 7 years ago
3 changed file(s) with 9 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
254254 }
255255
256256
257 static ngx_inline void
258 ngx_write_stdout(char *text)
259 {
260 (void) ngx_write_fd(ngx_stdout, text, ngx_strlen(text));
261 }
262
263
257264 extern ngx_module_t ngx_errlog_module;
258265 extern ngx_uint_t ngx_use_stderr;
259266
367367 #endif
368368
369369
370 #define ngx_stdout STDOUT_FILENO
370371 #define ngx_stderr STDERR_FILENO
371372 #define ngx_set_stderr(fd) dup2(fd, STDERR_FILENO)
372373 #define ngx_set_stderr_n "dup2(STDERR_FILENO)"
263263 size_t ngx_fs_bsize(u_char *name);
264264
265265
266 #define ngx_stdout GetStdHandle(STD_OUTPUT_HANDLE)
266267 #define ngx_stderr GetStdHandle(STD_ERROR_HANDLE)
267268 #define ngx_set_stderr(fd) SetStdHandle(STD_ERROR_HANDLE, fd)
268269 #define ngx_set_stderr_n "SetStdHandle(STD_ERROR_HANDLE)"