exec: read output from pipe before waiting for children
commitc2e1a3bcbbb25a09fca7c27c2d518f3601b8e2b1
authorSteve Bennett <steveb@workware.net.au>
Sun, 27 Mar 2016 03:30:25 +0000 (27 13:30 +1000)
committerSteve Bennett <steveb@workware.net.au>
Sun, 27 Mar 2016 03:34:40 +0000 (27 13:34 +1000)
tree4fb28a14bc1a9e447854e6be15293a51e3d1535b
parent62f87df83456d87289f3e01f97009c0a806e5fcb
exec: read output from pipe before waiting for children

It is necessary to read output from the pipe before waiting
for children to exit to avoid the output filling up and blocking.
The error results still needs to be read after the children have
exited, since it is read from a temp file, not a pipe.

Increase the length of the input to test exec-8.1 to catch
the problem.

Signed-off-by: Steve Bennett <steveb@workware.net.au>
jim-exec.c
tests/exec.test