[core] non-blocking write() to piped loggers
If pipe fills and would block, then discard remaining write. Do not block lighttpd if the logger blocks, such as if disk fills up.
This commit is contained in:
parent
e8226c11cb
commit
b9df146b3c
|
@ -847,6 +847,8 @@ static int fdevent_open_logger_pipe(const char *logger) {
|
|||
}
|
||||
fdevent_setfd_cloexec(fds[0]);
|
||||
fdevent_setfd_cloexec(fds[1]);
|
||||
/*(nonblocking write() from lighttpd)*/
|
||||
if (0 != fdevent_fcntl_set_nb(NULL, fds[1])) { /*(ignore)*/ }
|
||||
|
||||
pid = fdevent_open_logger_pipe_spawn(logger, fds[0]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue