Follow-up to 6fa3aa4, log cmd not args[0] which may be NULL

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2022-03-22 22:30:59 +01:00
1 parent e8099f1bfa
commit f87e9d8880
1 file changed
+2 -2
+2 -2
View File
@@ -180,9 +180,9 @@ int run(char *cmd, char *log)
result = WEXITSTATUS(status); result = WEXITSTATUS(status);
if (WIFEXITED(status)) { if (WIFEXITED(status)) {
_d("Started %s and exit without signal, status: %d", args[0], result); _d("Started '%s' and exit without signal, status: %d", cmd, result);
} else if (WIFSIGNALED(status)) { } else if (WIFSIGNALED(status)) {
_d("Process %s terminated by signal %d", args[0], WTERMSIG(status)); _d("Process '%s' terminated by signal %d", cmd, WTERMSIG(status));
if (!result) if (!result)
result = 1; /* Must alert callee that the command did complete successfully. result = 1; /* Must alert callee that the command did complete successfully.
* This is necessary since not all programs trap signals and * This is necessary since not all programs trap signals and