From 5f4287e56dd5c1feecc08843aae1d4e4b8835d1e Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 19 Apr 2013 12:50:40 -0500 Subject: Fix Documents folder creation dialog This resolves Bug 976 Prevent multiple kdesktop_lock processes from spawning per user --- kdesktop/lock/lockdlg.cc | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) (limited to 'kdesktop/lock/lockdlg.cc') diff --git a/kdesktop/lock/lockdlg.cc b/kdesktop/lock/lockdlg.cc index d401f0b2f..252ade384 100644 --- a/kdesktop/lock/lockdlg.cc +++ b/kdesktop/lock/lockdlg.cc @@ -423,29 +423,35 @@ void PasswordDlg::reapVerify() ::close( sFd ); int status; pid_t retpid = ::waitpid( sPid, &status, 0 ); - if (WIFEXITED(status)) { - switch (WEXITSTATUS(status)) { - case AuthOk: - greet->succeeded(); - accept(); - return; - case AuthBad: - greet->failed(); - mUnlockingFailed = true; - updateLabel(); - mFailedTimerId = startTimer(1500); - ok->setEnabled(false); - cancel->setEnabled(false); - mNewSessButton->setEnabled( false ); - return; - case AuthAbort: - return; - } - } - else if (WIFSIGNALED(status)) { + if (retpid < 0) { // FIXME // ERROR } + else { + if (WIFEXITED(status)) { + switch (WEXITSTATUS(status)) { + case AuthOk: + greet->succeeded(); + accept(); + return; + case AuthBad: + greet->failed(); + mUnlockingFailed = true; + updateLabel(); + mFailedTimerId = startTimer(1500); + ok->setEnabled(false); + cancel->setEnabled(false); + mNewSessButton->setEnabled( false ); + return; + case AuthAbort: + return; + } + } + else if (WIFSIGNALED(status)) { + // FIXME + // ERROR + } + } cantCheck(); } -- cgit v1.2.1