1 /* Copyright (C) 1992, 1993 Free Software Foundation, Inc.
2 This file is part of GNU Make.
4 GNU Make is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
9 GNU Make is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with GNU Make; see the file COPYING. If not, write to
16 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
18 /* Structure describing a running or dead child process. */
22 struct child
*next
; /* Link in the chain. */
24 struct file
*file
; /* File being remade. */
26 char **environment
; /* Environment for commands. */
28 char **command_lines
; /* Array of variable-expanded cmd lines. */
29 unsigned int command_line
; /* Index into above. */
30 char *command_ptr
; /* Ptr into command_lines[command_line]. */
32 pid_t pid
; /* Child process's ID number. */
33 unsigned int remote
:1; /* Nonzero if executing remotely. */
35 unsigned int noerror
:1; /* Nonzero if commands contained a `-'. */
37 unsigned int good_stdin
:1; /* Nonzero if this child has a good stdin. */
38 unsigned int deleted
:1; /* Nonzero if targets have been deleted. */
41 extern struct child
*children
;
43 extern void new_job ();
44 extern void reap_children ();
45 extern void start_waiting_jobs ();
47 extern char **construct_command_argv ();
48 extern void child_execute_job ();
49 extern void exec_command ();
51 extern unsigned int job_slots_used
;
54 extern void unblock_sigs ();
56 #ifdef HAVE_SIGSETMASK
57 extern int fatal_signal_mask
;
58 #define unblock_sigs() sigsetmask (0)
60 #define unblock_sigs()