summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-09-14 18:00:47 +0200
committerThiago Macieira <thiago.macieira@intel.com>2020-09-17 00:11:06 +0000
commit2ed99ff5ca338ac02f71c347b1449d4662e6c221 (patch)
tree6d169ec3fd9ef72a64541136fdcec117e1bea678 /src/corelib/io
parent0aa4b33b92da6a95d29caee62e4ac5e4c53a84ff (diff)
Make usage of forkfd_pidfd in QProcess a configurable feature
Our CI cross-compiling arm qemu builds have issues in tests that use QProcess, due to user-space qemu seemingly not supporting pidfds properly. Add a 'forkfd_pidfd' configure.json feature, which can be manually disabled when configuring Qt, causing QProcess to do a regular fork instead of using the new pidfd kernel feature. This will help us avoid the regression of multiple tests failing on the new Ubuntu 20.04 CI host images when they are run via qemu. Task-number: QTBUG-86285 Task-number: QTBUG-86187 Task-number: QTBUG-86198 Change-Id: Ib2209d7e95126e0fb738bf59e39070d5a62c482f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qprocess_unix.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
index f14e78f94e..5fce848c2c 100644
--- a/src/corelib/io/qprocess_unix.cpp
+++ b/src/corelib/io/qprocess_unix.cpp
@@ -461,6 +461,12 @@ void QProcessPrivate::startProcess()
int ffdflags = FFD_CLOEXEC;
if (childProcessModifier)
ffdflags |= FFD_USE_FORK;
+
+ // QTBUG-86285
+#if !QT_CONFIG(forkfd_pidfd)
+ ffdflags |= FFD_USE_FORK;
+#endif
+
pid_t childPid;
forkfd = ::forkfd(ffdflags , &childPid);
int lastForkErrno = errno;