diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-07-26 22:47:51 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-07-26 22:47:51 +0200 |
| commit | 69da43180e638518ed47424f2eba20cd25f2e093 (patch) | |
| tree | ac5fd5046b02db262a3a8be6d9c1536eaab5cec9 /src/lib/cross_linux.cc | |
| parent | 6eba051dcbb8c56e3e2efea946ce0380d17a7b33 (diff) | |
Fix some ignored return values.
Diffstat (limited to 'src/lib/cross_linux.cc')
| -rw-r--r-- | src/lib/cross_linux.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/cross_linux.cc b/src/lib/cross_linux.cc index 25fd3490e..28b8a4b41 100644 --- a/src/lib/cross_linux.cc +++ b/src/lib/cross_linux.cc @@ -113,7 +113,10 @@ run_ffprobe (boost::filesystem::path content, boost::filesystem::path out) { string ffprobe = "ffprobe \"" + content.string() + "\" 2> \"" + out.string() + "\""; LOG_GENERAL (N_("Probing with %1"), ffprobe); - system (ffprobe.c_str ()); + int const r = system (ffprobe.c_str()); + if (r == -1 || (WIFEXITED(r) && WEXITSTATUS(r) != 0)) { + LOG_GENERAL (N_("Could not run ffprobe (system returned %1"), r); + } } list<pair<string, string> > @@ -378,7 +381,10 @@ unprivileged () cerr << "getresuid() failed.\n"; exit (EXIT_FAILURE); } - seteuid (ruid); + if (seteuid(ruid) == -1) { + cerr << "seteuid() failed.\n"; + exit (EXIT_FAILURE); + } } PrivilegeEscalator::~PrivilegeEscalator () |
