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

Linux: capture both stdout and stderr in popen call to avoid printing anything

If an error happens, error message will be read from popen pipe and so
libpcsclite.so will not be found. This is the same outcome as when
stdout is empty.
This commit is contained in:
Mounir IDRASSI
2023-08-06 01:06:19 +02:00
parent 16bb1de3a6
commit dab261c694

View File

@@ -82,9 +82,9 @@ namespace VeraCrypt
string pcscPath = "";
FILE* pipe =
#ifdef TC_LINUX
popen("ldconfig -p", "r");
popen("ldconfig -p 2>&1", "r");
#else
popen("ldconfig -r", "r"); // FreeBSD
popen("ldconfig -r 2>&1", "r"); // FreeBSD
#endif
if (pipe)
{