lcw.c: fix busy wait on file descriptor (except briefly, after receiving SIGCHLD)