syswait used inside select

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>