diff options
author | Timothy Pearson <[email protected]> | 2013-06-29 13:19:09 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-06-29 13:19:09 -0500 |
commit | db67e0bb9c0b50c09790e2206d8d59b3573d7f55 (patch) | |
tree | a5e4978353e00cbdad52549453300b1ac1a83141 /kdesktop | |
parent | 719298b848ddafadf2cca33d550660ff75faac93 (diff) | |
download | tdebase-db67e0bb9c0b50c09790e2206d8d59b3573d7f55.tar.gz tdebase-db67e0bb9c0b50c09790e2206d8d59b3573d7f55.zip |
Terminate screensaver process on lock process termination
This resolves Bug 1419
Diffstat (limited to 'kdesktop')
-rw-r--r-- | kdesktop/lock/lockprocess.cc | 13 |
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); + } } //--------------------------------------------------------------------------- |