From: Michael D. Lowis Date: Thu, 6 Jun 2019 00:57:33 +0000 (-0400) Subject: fixed handling of hangups and errors in pipes X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=eeee46ef279bdae5aefb7c6352e3946fd81894dd;p=projs%2Ftide.git fixed handling of hangups and errors in pipes --- 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); }