From 7400db0f82632a4bc41c1e6fc628ae4d4c1b9385 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 26 Aug 2024 18:28:44 -0700 Subject: [PATCH] QProcess/Unix: restore the signal mask before re-enabling cancellations That way we will restore the thread's signal mask even if a thread cancellation is pending and thus forces an immediate stack unwind when we re-enable them. Pick-to: 6.8 Change-Id: I36589f84c5f4d8929129fffdbb77b2020c6fa5a6 Reviewed-by: Oswald Buddenhagen Reviewed-by: Thiago Macieira --- src/corelib/io/qprocess_unix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index 5c696433fdb..d434c8eb11e 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -283,8 +283,8 @@ struct QChildProcess if (workingDirectory >= 0) close(workingDirectory); - restoreThreadCancellations(); restoreSignalMask(); + restoreThreadCancellations(); } void maybeBlockSignals() noexcept