From eeee46ef279bdae5aefb7c6352e3946fd81894dd Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Wed, 5 Jun 2019 20:57:33 -0400 Subject: [PATCH] fixed handling of hangups and errors in pipes --- src/lib/job.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/job.c b/src/lib/job.c index 5f4ed42..9d082fa 100644 --- a/src/lib/job.c +++ b/src/lib/job.c @@ -81,7 +81,7 @@ static void job_process(int fd, int events) { job->readfn(job); if (job->writefn && (events & POLLOUT)) job->writefn(job); - if (!job->readfn && !job->writefn) + if ((events & (POLLHUP|POLLERR)) || (!job->readfn && !job->writefn)) job_finish(job); } -- 2.55.0