https://bugs.kde.org/show_bug.cgi?id=376573

--- Comment #8 from un...@physics.ubc.ca ---
The bugs.kde.org/attachment.cgi fails so here is the attachment text.
This patch adds a sleep(2) to kwalletd5 to make sure that X is up by the time
that the Qt functions are called. 
It also removes the call to waitForEnvironment() since it is not needed and
since that call hangs forever at least on Mageia 6, sddm. 
---------------------------------------------------------

diff -cr kwallet-5.32.0-orig/src/runtime/kwalletd/main.cpp
kwallet-5.32.0/src/runtime/kwalletd/main.cpp
*** kwallet-5.32.0-orig/src/runtime/kwalletd/main.cpp   2017-03-04
08:21:23.000000000 -0800
--- kwallet-5.32.0/src/runtime/kwalletd/main.cpp        2017-05-08
15:00:12.500570750 -0700
***************
*** 146,152 ****

      hash = waitForHash();

!     if (hash == nullptr || waitForEnvironment() == -1) {
          printf("kwalletd5: Hash or environment not received\n");
          free(hash);
          return nullptr;
--- 146,154 ----

      hash = waitForHash();

!     if (hash == nullptr /* || waitForEnvironment() == -1 */) {
!           //waitForEnvironment hangs and is not needed
! 
          printf("kwalletd5: Hash or environment not received\n");
          free(hash);
          return nullptr;
***************
*** 166,171 ****
--- 168,176 ----
  #ifndef Q_OS_WIN
      if (getenv("PAM_KWALLET5_LOGIN")) {
          hash = checkPamModule(argc, argv);
+       //There is a race which kwalletd5 always "looses" so must wait for 
+       // X to come up properly
+       if(hash != nullptr) sleep(2);
      }
  #endif

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to