Skip to content
Commit 152fa94b authored by Thiago Macieira's avatar Thiago Macieira Committed by Nicolas Fella
Browse files

Make ScopedProcessRunner hold the child until we register with systemd

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.
parent e0926fb4
Pipeline #649921 passed with stage
in 10 minutes and 2 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment