From ac0c225fe8804012dd2ea2cbcb4655f9bdbb3677 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Mon, 28 Aug 2023 23:34:09 +0300 Subject: [PATCH] kdesudo: increase the wait times in KDESu::KDESuPrivate::KCookie constructor to 3secs 100ms is not a whole lot with kernel scheduling, if the process is ready to read in less than 3secs the waiting will stop anyway Signed-off-by: Ivailo Monev --- kdesudo/kcookie.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kdesudo/kcookie.cpp b/kdesudo/kcookie.cpp index ce383803..d68d8d77 100644 --- a/kdesudo/kcookie.cpp +++ b/kdesudo/kcookie.cpp @@ -44,7 +44,7 @@ namespace KDESu kError() << "Could not run xauth.\n"; return; } - proc.waitForReadyRead(100); + proc.waitForReadyRead(3000); QByteArray output = proc.readLine().simplified(); if (output.isEmpty()) { kWarning() << "No X authentication info set for display " << m_Display; @@ -56,7 +56,7 @@ namespace KDESu return; } m_DisplayAuth = (lst[1] + ' ' + lst[2]); - proc.waitForFinished(100); // give QProcess a chance to clean up gracefully + proc.waitForFinished(3000); // give QProcess a chance to clean up gracefully #endif }