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
No known key found for this signature in database
GPG Key ID: 02C30AE90FAE4A6F

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