that library calls do not do that. Therefore, it's SIGCHLD handling causes a hang in wait() as openpty() already does that. Fix this by using waitpid() with WNOHANG. Diagnosed by: jhb Tested by: dhw (earlier version)