]> git.ipfire.org Git - thirdparty/make.git/commit
[SV 62145] Remove a stdin temp file on re-exec failure.
authorDmitry Goncharov <dgoncharov@users.sf.net>
Sat, 23 Apr 2022 19:33:41 +0000 (15:33 -0400)
committerPaul Smith <psmith@gnu.org>
Sun, 24 Apr 2022 14:39:32 +0000 (10:39 -0400)
commit949c0464a9f429e7778dbcf8ff78fc2d02911609
tree216a976d2bfba12d182c86bb2480f761267d120b
parent416664b1e79c0ca4ad463ad3a1bd17a6f00e7992
[SV 62145] Remove a stdin temp file on re-exec failure.

If the re-exec fails, be sure to remove a temp makefile that was
created to read from stdin.

* src/job.c (exec_command): Return on failure.
(child_execute_job): Call exit if exec_command returns.
* src/job.h (exec_command): Don't mark as NORETURN.
* src/main.c (main): Unlink stdin temporary file if re-exec fails.
* tests/run_make_tests.pl: Get value for ERR_nonexe_file/ERR_exe_dir.
* tests/scripts/features/temp_stdin: Test that temp file unlink works.
src/job.c
src/job.h
src/main.c
tests/run_make_tests.pl
tests/scripts/features/temp_stdin [new file with mode: 0644]