VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Core
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2021-11-28 00:46:07 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2021-11-28 00:50:26 +0100
commite7b3ca7334a502ceea28f8680b9583e0efb13f30 (patch)
treecabb4308d391e53e3cca2eae82f8c6b47933c47b /src/Core
parente42bc65ae91479a891fd1854a22e8aded7979b70 (diff)
downloadVeraCrypt-e7b3ca7334a502ceea28f8680b9583e0efb13f30.tar.gz
VeraCrypt-e7b3ca7334a502ceea28f8680b9583e0efb13f30.zip
Linux: try to fix some rare issues when invoking sudo using fork by waiting 1 second for forked process to start
Diffstat (limited to 'src/Core')
-rw-r--r--src/Core/Unix/CoreService.cpp3
1 files changed, 3 insertions, 0 deletions
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());