lib/subprocess: use SIGCHLD to detect child termination early
The subprocess now handles SIGCHLD for faster subprocess termination. We care about the original child and nothild else. If that dies we consider it as termination of subprocess and abandon reading from pipes even when there could be still process writing to them.
This should prevent from scripts hanging.
Reference #319 (closed).
Edited by Miroslav Hanak