summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/fbconvenience/qfbvthandler.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/platformsupport/fbconvenience/qfbvthandler.cpp b/src/platformsupport/fbconvenience/qfbvthandler.cpp
index 2e5d00c8bd..4c4a01a82e 100644
--- a/src/platformsupport/fbconvenience/qfbvthandler.cpp
+++ b/src/platformsupport/fbconvenience/qfbvthandler.cpp
@@ -116,14 +116,16 @@ QFbVtHandler::QFbVtHandler(QObject *parent)
m_signalNotifier = new QSocketNotifier(m_sigFd[1], QSocketNotifier::Read, this);
connect(m_signalNotifier, &QSocketNotifier::activated, this, &QFbVtHandler::handleSignal);
- struct sigaction sa;
- sa.sa_flags = 0;
- sa.sa_handler = signalHandler;
- sigemptyset(&sa.sa_mask);
- sigaction(SIGINT, &sa, 0); // Ctrl+C
- sigaction(SIGTSTP, &sa, 0); // Ctrl+Z
- sigaction(SIGCONT, &sa, 0);
- sigaction(SIGTERM, &sa, 0); // default signal used by kill
+ if (!qEnvironmentVariableIntValue("QT_QPA_NO_SIGNAL_HANDLER")) {
+ struct sigaction sa;
+ sa.sa_flags = 0;
+ sa.sa_handler = signalHandler;
+ sigemptyset(&sa.sa_mask);
+ sigaction(SIGINT, &sa, 0); // Ctrl+C
+ sigaction(SIGTSTP, &sa, 0); // Ctrl+Z
+ sigaction(SIGCONT, &sa, 0);
+ sigaction(SIGTERM, &sa, 0); // default signal used by kill
+ }
#endif
}