Skip to content

Commit

Permalink
QProcess/Darwin: disable use of vfork() on this OS
Browse files Browse the repository at this point in the history
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ø <[email protected]>
  • Loading branch information
thiagomacieira committed May 24, 2023
1 parent 9526e8d commit 815bb2a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/corelib/io/qprocess_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 815bb2a

Please sign in to comment.