summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock/lockdlg.cc
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-04-19 12:50:40 -0500
committerTimothy Pearson <[email protected]>2013-04-19 12:50:40 -0500
commit5f4287e56dd5c1feecc08843aae1d4e4b8835d1e (patch)
tree16ee641017a3a2f176b6a7291482b6146381e46d /kdesktop/lock/lockdlg.cc
parent6640770b3239ad117d29df2929e5b7442e48ee3a (diff)
downloadtdebase-5f4287e56dd5c1feecc08843aae1d4e4b8835d1e.tar.gz
tdebase-5f4287e56dd5c1feecc08843aae1d4e4b8835d1e.zip
Fix Documents folder creation dialog
This resolves Bug 976 Prevent multiple kdesktop_lock processes from spawning per user
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();
}