diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2023-08-06 01:06:19 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2023-08-06 01:06:19 +0200 |
commit | dab261c6941e1ee04d823effdf65784f1a554cb8 (patch) | |
tree | b76b3fabdbcf80853122929622c57eecb5172c10 | |
parent | 16bb1de3a6addec1c07b9ffc3fcd616744a3f15c (diff) | |
download | VeraCrypt-dab261c6941e1ee04d823effdf65784f1a554cb8.tar.gz VeraCrypt-dab261c6941e1ee04d823effdf65784f1a554cb8.zip |
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.
-rw-r--r-- | src/Common/SCardLoader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Common/SCardLoader.cpp b/src/Common/SCardLoader.cpp index ff3c9100..16026e62 100644 --- a/src/Common/SCardLoader.cpp +++ b/src/Common/SCardLoader.cpp @@ -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) { |