in reply to Re^4: $? is -1???
in thread $? is -1???

FWIW, if you took out WNOHANG, you shouldn't need to sleep at all (i.e. waitpid will do that for you at that point).