Make ScopedProcessRunner hold the child until we register with systemd
requested to merge thiago/kio:Make_ScopedProcessRunner_hold_the_child_until_we_register_with_systemd into master
The QProcess::processStarted signal is too late: that is emitted after the child process has execve'd the target executable. If that target exits or backgrounds too quickly, the PID we get from processId() may be stale. Hopefully it won't have got reused yet, but we get errors from systemd nonetheless. And in the case of a target that forks and backgrounds, the processes "escape" the confinement. This is seen with Chrome/Chromium, which means their processes end up in plasma-krunner.service and slice.
So, instead, we must hold the child process before execve() and we do that with an eventfd. Once systemd has replied to us, we release the child.
SystemdProcessRunner doesn't need this change.