QProcess/Darwin: disable use of vfork() on this OS

The CI is failing running all the startDetached() tests, despite this
passing on my machine (both macOS 12 and 13). We don't know why it's
happening, so we just disable use of vfork(). This doesn't affect the
regular startProcess() because forkfd() requires full fork() in OSes
without pidfd or pdfork, but it does prevent changing startDetached()
behavior, starting with the next commit.

Change-Id: Ib5ce7a497e034ebabb2cfffd1761d91c456f20e0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Thiago Macieira 2023-05-23 11:27:31 -07:00
parent 9526e8dc33
commit 815bb2a4fb

View File

@ -463,6 +463,11 @@ static int useForkFlags(const QProcessPrivate::UnixExtras *unixExtras)
// QTBUG-86285)
return FFD_USE_FORK;
#endif
#if defined(Q_OS_DARWIN)
// Using vfork() for startDetached() is causing problems. We don't know
// why: without the tools to investigate why it happens, we didn't bother.
return FFD_USE_FORK;
#endif
if (!unixExtras || !unixExtras->childProcessModifier)
return 0; // no modifier was supplied