diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2023-05-25 10:19:04 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2023-06-09 17:27:46 -0700 |
commit | 062b2ac71bac1e0449eff7f8f02cb0020ad39991 (patch) | |
tree | eb6d57da8984e3260fd6cd7ff4620b4075f2271f /src/corelib/io/qprocess_unix.cpp | |
parent | 78cdd9a64dc0cd666e5c8daafa7477c29641420d (diff) |
QProcess/Unix: reset the signal block if ResetSignalHandlers requested
This amends commit f9c87cfd44bcf4b90cb45354252ef19f647b0469 to reset the
signal block mask too, not just the signal handlers. For this, SIGPIPE
is not treated specially.
Pick-to: 6.6
Change-Id: Ib5ce7a497e034ebabb2cfffd17627289614bf315
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/io/qprocess_unix.cpp')
-rw-r--r-- | src/corelib/io/qprocess_unix.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index 90ee3cb0b4..5da99ccc75 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -613,6 +613,11 @@ static void applyProcessParameters(const QProcess::UnixProcessParameters ¶ms if (!ignore_sigpipe || sig != SIGPIPE) signal(sig, SIG_DFL); } + + // and unmask all signals + sigset_t set; + sigemptyset(&set); + sigprocmask(SIG_SETMASK, &set, nullptr); } // Close all file descriptors above stderr. |