]> git.ipfire.org Git - thirdparty/make.git/commit
Align child_execute_job among different ports
authorPaul Smith <psmith@gnu.org>
Sat, 7 Sep 2019 00:56:19 +0000 (20:56 -0400)
committerPaul Smith <psmith@gnu.org>
Sat, 7 Sep 2019 22:27:26 +0000 (18:27 -0400)
commit9da708772cd9b48121c7e5ac539ff36f086f1438
tree6726d5634b8e151bd26ee6769ac7f061f52cb38e
parent09676240506f6d7f76d5beb6d80734a89168b0be
Align child_execute_job among different ports

Create a struct childbase which is the basics of struct child needed
to invoke child_execute_job(), and can be cast back and forth to a
struct child.  Ensure all implementations of child_execute_job() take
the same arguments.

* src/job.h (CHILDBASE): Create a macro to hold the base parts.
(struct childbase): A structure containing CHILDBASE.
(struct child): Use CHILDBASE as the initial part of child.
[VMS]: Remove declaration of VMS version of child_execute_job.
* src/job.c (start_job_command): Use new child_execute_job() call.
(child_execute_job) [__EMX__]: Implement new calling signature.
(child_execute_job): Implement new calling signature.
* src/main.c (main) [__EMX__]: Use new child_execute_job() call.
* src/function.c (func_shell_base): Use new child_execute_job() call.
* src/vmsjobs.c (vmsHandleChildTerm): Accept struct childbase.
* src/vmsjobs.c (child_execute_job): Implement new calling signature.
Modify the return value to be pid_t, not a boolean, and return the
PID rather than setting it in the child.  This is OK because our only
caller immediately reset PID to -1 anyway if we return 0.
src/function.c
src/job.c
src/job.h
src/main.c
src/vmsjobs.c