Correct handle when select in spawn returns with an error (e.g. SIGWINCH...

passes tools/testall.py