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.

Change-Id: I36589f84c5f4d8929129fffdbb77b2020c6fa5a6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7400db0f82632a4bc41c1e6fc628ae4d4c1b9385)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Thiago Macieira 2024-08-26 18:28:44 -07:00 committed by Qt Cherry-pick Bot
parent 4e66be84be
commit 105c05dfb2

View File

@ -283,8 +283,8 @@ struct QChildProcess
if (workingDirectory >= 0)
close(workingDirectory);
restoreThreadCancellations();
restoreSignalMask();
restoreThreadCancellations();
}
void maybeBlockSignals() noexcept