]> git.ipfire.org Git - thirdparty/make.git/commit
Show useful errors when posix_spawn() doesn't do so
authorPaul Smith <psmith@gnu.org>
Tue, 3 Sep 2019 20:17:50 +0000 (16:17 -0400)
committerPaul Smith <psmith@gnu.org>
Sat, 7 Sep 2019 22:27:26 +0000 (18:27 -0400)
commit005a251689d90d4cd311151e5da7015719b918b9
tree1d53fc19ee524aa81a50c0ece0607f8954a1306c
parent76b6e668a60d4c1eff5e231198f52e6d5f948be1
Show useful errors when posix_spawn() doesn't do so

The posix_spawn() function may not detect that the command to run is
invalid when it's invoked.  Instead, it will run then exit with
error code 127.  If that happens do our best to present the user
with a useful error message.

* src/job.h (struct child): Add cmd_name to hold the command we ran.
* src/job.c (start_job_command): On success, remember the cmd_name.
(reap_children): On exit 127, stat cmd_name and show a useful error.
(free_child): Free cmd_name.
src/job.c
src/job.h