1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 02:58:02 -06:00

Linux: try to fix some rare issues when invoking sudo using fork by waiting 1 second for forked process to start

This commit is contained in:
Mounir IDRASSI
2021-11-28 00:46:07 +01:00
parent e42bc65ae9
commit e7b3ca7334

View File

@@ -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());