Tcl version btwn 9 & 10? Are you using an expect binary or loading as a package?
The error message is pretty benevolent in theory. It's the same call as:
Code:
waitpid(-1,&status,WNOHANG);
If the child hasn't exited by the time you check for exit then this is the
message you will get. There is also the possibilty that you are simply calling
exec
instead of fork and exec in which case behavior is random after the first
wait iirc.
Have you considered asynchronously handling SIGCHLD via trap as an experiment?