Fixed a bug when a process waits synchronously and asynchronously for two child processes on a POSIX system