From e7b3ca7334a502ceea28f8680b9583e0efb13f30 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 28 Nov 2021 00:46:07 +0100 Subject: Linux: try to fix some rare issues when invoking sudo using fork by waiting 1 second for forked process to start --- src/Core/Unix/CoreService.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Core/Unix/CoreService.cpp b/src/Core/Unix/CoreService.cpp index 44389612..f05d8569 100644 --- a/src/Core/Unix/CoreService.cpp +++ b/src/Core/Unix/CoreService.cpp @@ -458,6 +458,9 @@ namespace VeraCrypt adminPassword[request.AdminPassword.size()] = '\n'; } +#if defined(TC_LINUX ) + Thread::Sleep (1000); // wait 1 second for the forked sudo to start +#endif if (write (inPipe->GetWriteFD(), &adminPassword.front(), adminPassword.size())) { } // Errors ignored burn (&adminPassword.front(), adminPassword.size()); -- cgit v1.2.3