summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock/lockdlg.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kdesktop/lock/lockdlg.cc')
-rw-r--r--kdesktop/lock/lockdlg.cc46
1 files changed, 26 insertions, 20 deletions
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();
}