From db67e0bb9c0b50c09790e2206d8d59b3573d7f55 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 29 Jun 2013 13:19:09 -0500 Subject: Terminate screensaver process on lock process termination This resolves Bug 1419 --- kdesktop/lock/lockprocess.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'kdesktop') 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); + } } //--------------------------------------------------------------------------- -- cgit v1.2.1