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