qt5base-lts/tests/auto/corelib/io/qprocess
Thiago Macieira ba05af82d3 QProcess/Unix: protect against stack unwinding in the child process stub
There are two types of stack unwinding that can happen on Unix systems:
C++ exceptions and PThread cancellations (on some systems, like Linux,
PThread cancellations can be caught in catch(...) statements). We call a
variety of PThread cancellation functions from inside the child stub,
like close(). To avoid problems, we disable PThread cancellations
completely before fork() or vfork().

The C++ exception case is simpler, because we can be sure of catching
them with the catch (...) statement and simply transform them into an
error message. This is also testable, which the PThread cancellation
isn't.

The error message isn't ideal because we're string-frozen. I'll improve
it for 6.6.

Pick-to: 6.5
Change-Id: Icfe44ecf285a480fafe4fffd174d97a475c93ff1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-05-15 10:10:03 -07:00
..
fileWriterProcess tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
test tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
testBatFiles Moving relevant tests to corelib/io 2011-08-31 10:08:38 +02:00
testDetached tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
testExitCodes tst_QProcess: don't link non-Qt helpers to QtCore 2023-04-25 18:53:30 -07:00
testForwarding QThread: add sleep(std::chrono::nanoseconds) overload 2023-03-13 23:26:28 +02:00
testForwardingHelper tst_QProcess: don't link non-Qt helpers to QtCore 2023-04-25 18:53:30 -07:00
testGuiProcess tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
testProcessCrash tst_QProcess: don't link non-Qt helpers to QtCore 2023-04-25 18:53:30 -07:00
testProcessDeadWhileReading tst_QProcess: don't link non-Qt helpers to QtCore 2023-04-25 18:53:30 -07:00
testProcessEcho tst_QProcess: don't link non-Qt helpers to QtCore 2023-04-25 18:53:30 -07:00
testProcessEcho2 tst_QProcess: don't link non-Qt helpers to QtCore 2023-04-25 18:53:30 -07:00
testProcessEcho3 tst_QProcess: don't link non-Qt helpers to QtCore 2023-04-25 18:53:30 -07:00
testProcessEchoGui tst_QProcess: don't link non-Qt helpers to QtCore 2023-04-25 18:53:30 -07:00
testProcessEnvironment tst_QProcess: don't link non-Qt helpers to QtCore 2023-04-25 18:53:30 -07:00
testProcessEOF tst_QProcess: don't link non-Qt helpers to QtCore 2023-04-25 18:53:30 -07:00
testProcessHang tst_QProcess: don't link non-Qt helpers to QtCore 2023-04-25 18:53:30 -07:00
testProcessNormal tst_QProcess: don't link non-Qt helpers to QtCore 2023-04-25 18:53:30 -07:00
testProcessOutput tst_QProcess: don't link non-Qt helpers to QtCore 2023-04-25 18:53:30 -07:00
testProcessSpacesArgs tst_QProcess: don't link non-Qt helpers to QtCore 2023-04-25 18:53:30 -07:00
testSetNamedPipeHandleState tst_QProcess: don't link non-Qt helpers to QtCore 2023-04-25 18:53:30 -07:00
testSetWorkingDirectory tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
testSoftExit tst_QProcess: don't link non-Qt helpers to QtCore 2023-04-25 18:53:30 -07:00
testSpaceInName tst_QProcess: don't link non-Qt helpers to QtCore 2023-04-25 18:53:30 -07:00
.gitignore test: Moving tst_QProcess::echoTest_performance() 2012-10-19 02:43:05 +02:00
BLACKLIST Update for failures only on dev branch. Use general platform names 2019-08-19 18:22:11 +02:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
tst_qprocess.cpp QProcess/Unix: protect against stack unwinding in the child process stub 2023-05-15 10:10:03 -07:00