From a39b7f8e5b150c9c94ecf46f95084e4f001b03f2 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 4 Apr 2018 15:56:21 +0200 Subject: [PATCH] Revert "proc: avoid stdio deadlocks" This reverts commit ccd9717ba5d501b45fda957f0ea41c4660ef414c. --- proc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/proc.c b/proc.c index edfcc8f..e360897 100644 --- a/proc.c +++ b/proc.c @@ -265,7 +265,6 @@ static void proc_write_cb(struct uloop_fd *fd, unsigned int events) struct client *cl = container_of(fd, struct client, dispatch.proc.wrfd); client_poll_post_data(cl); - cl->dispatch.data_blocked = false; } static void proc_relay_write_cb(struct client *cl) @@ -292,10 +291,8 @@ static int proc_data_send(struct client *cl, const char *data, int len) if (errno == EINTR) continue; - if (errno == EAGAIN || errno == EWOULDBLOCK) { - cl->dispatch.data_blocked = true; + if (errno == EAGAIN || errno == EWOULDBLOCK) break; - } /* consume all data */ ret = len; @@ -369,7 +366,6 @@ bool uh_create_process(struct client *cl, struct path_info *pi, char *url, proc->wrfd.fd = wfd[1]; uh_relay_open(cl, &proc->r, rfd[0], pid); - uloop_fd_add(&proc->wrfd, ULOOP_WRITE); d->free = proc_free; d->close_fds = proc_close_fds; -- 2.25.1