summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock/lockprocess.cc
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-04-12 23:05:48 -0500
committerSlávek Banko <slavek.banko@axis.cz>2015-04-14 02:27:27 +0200
commit7188f7044b0bb11a24754cfa83d39ecc0721bbdb (patch)
tree468a3df55336124e182235cf012d2ba0fb754a73 /kdesktop/lock/lockprocess.cc
parent5d4afcb68fdff18aa9e44d1d111130cdb43e9ba4 (diff)
downloadtdebase-7188f7044b0bb11a24754cfa83d39ecc0721bbdb.tar.gz
tdebase-7188f7044b0bb11a24754cfa83d39ecc0721bbdb.zip
Fix long-standing inverted signal mask in kdesktop_lock initial sigsuspend
Prevent helper thread termination signal from errantly being handled by main thread (cherry picked from commit 37bc5cdd0e31fd9c8712c0bd88039dd474be4418)
Diffstat (limited to 'kdesktop/lock/lockprocess.cc')
-rw-r--r--kdesktop/lock/lockprocess.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc
index da12bd46c..a4a2badd3 100644
--- a/kdesktop/lock/lockprocess.cc
+++ b/kdesktop/lock/lockprocess.cc
@@ -2842,6 +2842,13 @@ void ControlPipeHandlerObject::run(void) {
mThreadID = pthread_self();
mRunning = true;
+ sigset_t new_mask;
+ sigemptyset(&new_mask);
+ sigaddset(&new_mask, SIGUSR1);
+
+ // Unblock SIGUSR1
+ pthread_sigmask(SIG_UNBLOCK, &new_mask, NULL);
+
int display_number = atoi(TQString(XDisplayString(tqt_xdisplay())).replace(":","").ascii());
if (display_number < 0) {