From 815bb2a4fb13dc2e15b87310a6b851026a50bf7d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 23 May 2023 11:27:31 -0700 Subject: [PATCH] QProcess/Darwin: disable use of vfork() on this OS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- src/corelib/io/qprocess_unix.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index 0064c4f662..a6851b69e9 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -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