Process: Fix race while waiting for child process group

Since commit ef517b19 (Process: Added initial support for process groups., 2015-07-02), when creating a process in kwsysProcessCreate, we create a pgidPipe which gets closed when the child does the execvp call. After fork, the parent reads the pgidPipe until it returns EOF or an error. There is a race condition if the parent's blocking read call wakes up only after the child has already exited, leading to SIGCHLD and read returning -1 with EINTR.

Reported on discourse.

Merge request reports

Loading
Loading