summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
+ }
}
//---------------------------------------------------------------------------