From: Felix Fietkau Date: Sun, 16 Oct 2011 14:25:59 +0000 (+0200) Subject: fix infinite loop in logging when the logged process dies X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cb9d7370302cb0ffc0c750e928f5413089cbca4c;p=oweals%2Fnetifd.git fix infinite loop in logging when the logged process dies --- diff --git a/main.c b/main.c index 02fd9ff..b17f053 100644 --- a/main.c +++ b/main.c @@ -98,7 +98,7 @@ retry: if (errno == EINTR) goto retry; - return; + goto out; } proc->log_buf_ofs += len; @@ -134,6 +134,10 @@ retry: if (read_len == maxlen) goto retry; + +out: + if (fd->eof) + uloop_fd_delete(fd); } static void