SlapPopen: Fix select-based timeout reads
Xavier Thompson authored
Read from stdout or stderr only when the event returned by the
selector guarantees that the read will be non-blocking.

Switch to using high-level selectors API instead of low-level
select/poll.
50507d2b