cgi-io: close pipe descriptors early
authorJo-Philipp Wich <jo@mein.io>
Wed, 18 Dec 2019 08:32:38 +0000 (09:32 +0100)
committerJohn Crispin <john@phrozen.org>
Wed, 18 Dec 2019 10:00:15 +0000 (11:00 +0100)
commitdde503da13d5d0541187e81eda15e7693f38cb4f
tree31b539db77f3bdbba20a2366e7915667218d8c64
parentb1634c1737bb016f602a13802faba08570b9cb70
cgi-io: close pipe descriptors early

In the command read side, close the superfluous write end of the pipe
early to ensure that EOF is reliably detected. Without that change, splice
calls to read from the pipe will occasionally hang until the CGI process
is eventually killed due to timeout.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
net/cgi-io/Makefile
net/cgi-io/src/main.c