POSIX: Abort script on executable failure

This commit is contained in:
Lorenz Meier
2015-09-12 16:58:14 +02:00
parent 4fb6e135d6
commit 12372d7de6
+5 -1
View File
@@ -91,7 +91,11 @@ static void run_cmd(const vector<string> &appargs)
}
arg[i] = (char *)0;
apps[command](i, (char **)arg);
int retval = apps[command](i, (char **)arg);
if (retval) {
exit(retval);
}
usleep(65000);
} else if (command.compare("help") == 0) {