qt6-bb10/tests/auto/corelib/io/qprocess
Thiago Macieira ee068f2ec5 QProcess/Unix: don't close the childStartedPipe too soon
We were accidentally closing it along with all the other file
descriptors if the CloseFileDescriptors flag was active. That meant we
were unable to report start problems back to the parent process.

So instead of closing everything immediately, we simply mark everything
as FD_CLOEXEC so they'll be closed by execve()'s success. Because we're
using CLOSE_RANGE_CLOEXEC now to detect the system call, we don't need
the configure-time test.

[ChangeLog][QtCore][QProcess] Fixed a bug that caused QProcess not to
report start failures if the UnixProcessFlag::CloseFileDescriptors flag
was active.

Change-Id: I4d81d763281354e886d9fffd56ef6ab8b6115715
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
(cherry picked from commit 3d007ff2e9caf328f92d65f71a94fd869552b1b6)
(cherry picked from commit 01010851cb61f5d7964ba2317defb67cdfcb72f5)
2025-02-22 13:20:54 +00:00
..
fileWriterProcess Tests: make some QFile::open calls fail 2024-04-13 01:36:06 +02:00
test QProcess: add testUnixProcessParameters as a dep. for tst_qprocess 2023-06-18 20:32:30 +03:00
testBatFiles Add copyright and licensing to .bat files missing them 2024-05-08 13:09:40 +02:00
testDetached Change license for tests files 2024-02-04 09:56:42 +01:00
testExitCodes Change license for tests files 2024-02-04 09:56:42 +01:00
testForwarding Change license for tests files 2024-02-04 09:56:42 +01:00
testForwardingHelper Change license for tests files 2024-02-04 09:56:42 +01:00
testGuiProcess Change license for tests files 2024-02-04 09:56:42 +01:00
testProcessCrash De-duplicate the disabling of crash dialogs in our unit tests 2025-01-20 21:30:42 +00:00
testProcessDeadWhileReading Change license for tests files 2024-02-04 09:56:42 +01:00
testProcessEOF Change license for tests files 2024-02-04 09:56:42 +01:00
testProcessEcho Change license for tests files 2024-02-04 09:56:42 +01:00
testProcessEcho2 Change license for tests files 2024-02-04 09:56:42 +01:00
testProcessEcho3 Change license for tests files 2024-02-04 09:56:42 +01:00
testProcessEchoGui Change license for tests files 2024-02-04 09:56:42 +01:00
testProcessEnvironment Change license for tests files 2024-02-04 09:56:42 +01:00
testProcessHang Change license for tests files 2024-02-04 09:56:42 +01:00
testProcessNormal Change license for tests files 2024-02-04 09:56:42 +01:00
testProcessOutput Change license for tests files 2024-02-04 09:56:42 +01:00
testProcessSpacesArgs Change license for tests files 2024-02-04 09:56:42 +01:00
testSetNamedPipeHandleState Change license for tests files 2024-02-04 09:56:42 +01:00
testSetWorkingDirectory Change license for tests files 2024-02-04 09:56:42 +01:00
testSoftExit Change license for tests files 2024-02-04 09:56:42 +01:00
testSpaceInName Change license for tests files 2024-02-04 09:56:42 +01:00
testUnixProcessParameters Change license for tests files 2024-02-04 09:56:42 +01:00
.gitignore test: Moving tst_QProcess::echoTest_performance() 2012-10-19 02:43:05 +02:00
CMakeLists.txt CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
crasher.h De-duplicate the disabling of crash dialogs in our unit tests 2025-01-20 21:30:42 +00:00
tst_qprocess.cpp QProcess/Unix: don't close the childStartedPipe too soon 2025-02-22 13:20:54 +00:00