summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-06-29 13:19:09 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-06-29 13:19:09 -0500
commitdb67e0bb9c0b50c09790e2206d8d59b3573d7f55 (patch)
treea5e4978353e00cbdad52549453300b1ac1a83141 /kdesktop/lock
parent719298b848ddafadf2cca33d550660ff75faac93 (diff)
downloadtdebase-db67e0bb9c0b50c09790e2206d8d59b3573d7f55.tar.gz
tdebase-db67e0bb9c0b50c09790e2206d8d59b3573d7f55.zip
Terminate screensaver process on lock process termination
This resolves Bug 1419
Diffstat (limited to 'kdesktop/lock')
-rw-r--r--kdesktop/lock/lockprocess.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc
index 46ec0aec0..aa4bdd570 100644
--- a/kdesktop/lock/lockprocess.cc
+++ b/kdesktop/lock/lockprocess.cc
@@ -435,7 +435,10 @@ static void sigterm_handler(int)
{
if (!trinity_desktop_lock_in_sec_dlg) {
// Exit uncleanly
- exit(1);
+ char tmp = 'U';
+ if (::write( signal_pipe[1], &tmp, 1) == -1) {
+ // Error handler to shut up gcc warnings
+ }
}
}
@@ -531,12 +534,18 @@ void LockProcess::signalPipeSignal()
if (::read( signal_pipe[0], &tmp, 1) == -1) {
// Error handler to shut up gcc warnings
}
- if( tmp == 'T' )
+ if( tmp == 'T' ) {
quitSaver();
+ }
else if( tmp == 'H' ) {
if( !mLocked )
startLock();
}
+ else if( tmp == 'U' ) {
+ // Exit uncleanly
+ quitSaver();
+ exit(1);
+ }
}
//---------------------------------------------------------------------------