# HG changeset patch # User Andreas Weber # Date 1402651683 -7200 # Node ID 5b7b18d603ae07299ac5be59521b8833c6b182de # Parent 4ae67c0553ae83823b4749d322094acf2e18c55b mkoctfile.in.cc: fix return value if subprocess fails (bug #42549). * mkoctfile.in.cc (run_command): Use WIFEXITED and WEXITSTATUS macros to correctly extract return status from system() command. diff -r 4ae67c0553ae -r 5b7b18d603ae src/mkoctfile.in.cc --- a/src/mkoctfile.in.cc Fri Jun 13 08:21:28 2014 -0700 +++ b/src/mkoctfile.in.cc Fri Jun 13 11:28:03 2014 +0200 @@ -344,7 +344,10 @@ { if (debug) std::cout << cmd << std::endl; - return system (cmd.c_str ()); + int result = system (cmd.c_str ()); + if (WIFEXITED (result)) + result = WEXITSTATUS (result); + return result; } bool