Fixed possible deadlock in select

seems there was a race condition/deadlock (observed only in ubuntu perl 5.14.2) in select

===
sudo strace -p 22187
Process 22187 attached - interrupt to quit
wait4(-1,

sudo strace -p 22188
Process 22188 attached - interrupt to quit
select(8, [5], NULL, NULL, NULL
===

possible reason is https://rt.perl.org/Ticket/Display.html?id=93428
(seems sometimes select() isn't interruptable)

fixes:

1. before terminating child processes with signal USR2, close all pipes to children.
2. don't use select() in children at all. use blocking read (sysread()) which is interruptible
chnagelog updated
whitespace fixes