commit 52053e1a61dcf07752f449f8f430855004d4037b from: Omar Polo date: Sat Feb 06 09:56:34 2021 UTC ensure CGI stdout it's blocking commit - 19e7bd00a3d1b2574e3ed149fa354d45e83a8b50 commit + 52053e1a61dcf07752f449f8f430855004d4037b blob - 1be5891757da66d7dd88503d7d4fc8ca5435376f blob + d6bcabf485c3f54c9fa043dc420c39b7f14849e7 --- ex.c +++ ex.c @@ -238,7 +238,7 @@ launch_cgi(struct iri *iri, const char *spath, char *r { int p[2]; /* read end, write end */ - if (pipe2(p, O_NONBLOCK) == -1) + if (pipe(p) == -1) return -1; switch (fork()) { @@ -321,6 +321,7 @@ launch_cgi(struct iri *iri, const char *spath, char *r default: close(p[1]); + mark_nonblock(p[0]); return p[0]; }