Check the return value from pipe(2)

Starting from GCC 10 not checking this will produce a warning.
This commit is contained in:
Robbert van der Helm
2020-06-20 18:43:36 +02:00
parent 6a01856f37
commit 1e6188d774
3 changed files with 11 additions and 1 deletions
+5
View File
@@ -78,6 +78,11 @@ int __cdecl main(int argc, char* argv[]) {
<< std::endl;
std::cerr << error.what() << std::endl;
return 0;
} catch (const std::system_error& error) {
std::cerr << "Could not create pipe:" << std::endl;
std::cerr << error.what() << std::endl;
return 0;
}
}