Produce a meaningful error message if unable to spawn essential binaries

This commit is contained in:
Jeremiah Orians 2022-01-22 16:31:38 -05:00
parent ae5ae61461
commit e4ca1f3518
No known key found for this signature in database
GPG Key ID: 6B3A3F198708F894
2 changed files with 4 additions and 1 deletions

View File

@ -173,6 +173,9 @@ int _execute(char* name, char** array, char** envp)
/* We are not fuzzing */ /* We are not fuzzing */
/* execve() returns only on error */ /* execve() returns only on error */
execve(program, array, envp); execve(program, array, envp);
fputs("Unable to execute: ", stderr);
fputs(program, stderr);
fputs("\nPlease check file permissions and that it is a valid binary\n", stderr);
} }
/* Prevent infinite loops */ /* Prevent infinite loops */

View File

@ -90,7 +90,7 @@ clean:
rm -rf bin/ rm -rf bin/
# ./test/test0000/cleanup.sh # ./test/test0000/cleanup.sh
.PHONY: clean-temp .PHONY: clean-tmp
clean-tmp: clean-tmp:
rm -vf /tmp/M2-Mesoplanet-* rm -vf /tmp/M2-Mesoplanet-*
rm -vf /tmp/M2-Planet-* rm -vf /tmp/M2-Planet-*