Don't block when doing 'exec wait', and reading from pipe.
authorAlan T. DeKok <aland@freeradius.org>
Fri, 16 Apr 2010 14:12:01 +0000 (16:12 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 16 Apr 2010 14:14:53 +0000 (16:14 +0200)
If the child is slow, then reading from the pipe will block until
the child exits.  This will happen even if we intend later to wait
only 10 seconds for the child pid.

The solution is to call select() on the pipe.  After 10 seconds,
if no progress has been made: kill -TERM the child, close the pipe,
and clean up the child PID.


No differences found