Browse Source

[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.
personal/stbuehler/fix-fdevent
Glenn Strauss 4 years ago
parent
commit
b9df146b3c
  1. 2
      src/fdevent.c

2
src/fdevent.c

@ -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…
Cancel
Save