Browse Source

Fix printing of debug information on KDED crash

Timothy Pearson 4 years ago
parent
commit
d80ccaf94c
1 changed files with 7 additions and 3 deletions
  1. 7
    3
      kded/kded.cpp

+ 7
- 3
kded/kded.cpp View File

@@ -441,13 +441,17 @@ void Kded::updateResourceList()
441 441
 void Kded::crashHandler(int)
442 442
 {
443 443
    DCOPClient::emergencyClose();
444
-   if (_self) // Don't restart if we were closing down
445
-      system("kded");
446
-tqWarning("Last DCOP call before KDED crash was from application '%s'\n"
444
+   if (_self) { // Don't restart if we were closing down
445
+      tqWarning("Last DCOP call before KDED crash was from application '%s'\n"
447 446
          "to object '%s', function '%s'.",
448 447
          DCOPClient::postMortemSender(),
449 448
          DCOPClient::postMortemObject(),
450 449
          DCOPClient::postMortemFunction());
450
+      tqWarning("Restarting KDED...\n");
451
+      if (system("kded") < 0) {
452
+         tqWarning("Unable to restart KDED!\n");
453
+      }
454
+   }
451 455
 }
452 456
 
453 457
 void Kded::installCrashHandler()

Loading…
Cancel
Save