mirror of
https://git.savannah.gnu.org/git/make.git
synced 2025-01-30 02:40:26 +00:00
* src/makeint.h: Use pid_t to store PIDs, of int.
* src/commands.c (getpid): Ditto. * src/job.h (*): Ditto. * src/job.c (*): Ditto. * src/main.c (main): Ditto. * src/remote-cstms.c (start_remote_job): Ditto. * src/remote-stub.c (start_remote_job): Ditto.
This commit is contained in:
parent
b7acb10e86
commit
3f194b69e3
7 changed files with 15 additions and 14 deletions
|
@ -32,7 +32,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
|||
#endif
|
||||
|
||||
#ifndef HAVE_UNISTD_H
|
||||
int getpid ();
|
||||
pid_t getpid ();
|
||||
#endif
|
||||
|
||||
|
||||
|
|
15
src/job.c
15
src/job.c
|
@ -1379,7 +1379,8 @@ start_job_command (struct child *child)
|
|||
/* start_waiting_job has set CHILD->remote if we can start a remote job. */
|
||||
if (child->remote)
|
||||
{
|
||||
int is_remote, id, used_stdin;
|
||||
int is_remote, used_stdin;
|
||||
pid_t id;
|
||||
if (start_remote_job (argv, child->environment,
|
||||
child->good_stdin ? 0 : get_bad_stdin (),
|
||||
&is_remote, &id, &used_stdin))
|
||||
|
@ -2133,10 +2134,10 @@ start_waiting_jobs (void)
|
|||
|
||||
/* EMX: Start a child process. This function returns the new pid. */
|
||||
# if defined __EMX__
|
||||
int
|
||||
pid_t
|
||||
child_execute_job (struct output *out, int good_stdin, char **argv, char **envp)
|
||||
{
|
||||
int pid;
|
||||
pid_t pid;
|
||||
int fdin = good_stdin ? FD_STDIN : get_bad_stdin ();
|
||||
int fdout = FD_STDOUT;
|
||||
int fderr = FD_STDERR;
|
||||
|
@ -2231,14 +2232,14 @@ child_execute_job (struct output *out, int good_stdin, char **argv, char **envp)
|
|||
/* POSIX:
|
||||
Create a child process executing the command in ARGV.
|
||||
ENVP is the environment of the new program. Returns the PID or -1. */
|
||||
int
|
||||
pid_t
|
||||
child_execute_job (struct output *out, int good_stdin, char **argv, char **envp)
|
||||
{
|
||||
const int fdin = good_stdin ? FD_STDIN : get_bad_stdin ();
|
||||
int fdout = FD_STDOUT;
|
||||
int fderr = FD_STDERR;
|
||||
int r;
|
||||
int pid;
|
||||
pid_t pid;
|
||||
|
||||
/* Divert child output if we want to capture it. */
|
||||
if (out && out->syncout)
|
||||
|
@ -2283,7 +2284,7 @@ child_execute_job (struct output *out, int good_stdin, char **argv, char **envp)
|
|||
|
||||
/* EMX: This function returns the pid of the child process. */
|
||||
# ifdef __EMX__
|
||||
int
|
||||
pid_t
|
||||
# else
|
||||
void
|
||||
# endif
|
||||
|
@ -2359,7 +2360,7 @@ exec_command (char **argv, char **envp)
|
|||
#else /* !WINDOWS32 */
|
||||
|
||||
# ifdef __EMX__
|
||||
int pid;
|
||||
pid_t pid;
|
||||
# endif
|
||||
|
||||
/* Be the user, permanently. */
|
||||
|
|
|
@ -62,7 +62,7 @@ char **construct_command_argv (char *line, char **restp, struct file *file,
|
|||
#ifdef VMS
|
||||
int child_execute_job (struct child *child, char *argv);
|
||||
#else
|
||||
int child_execute_job (struct output *out, int good_stdin, char **argv, char **envp);
|
||||
pid_t child_execute_job (struct output *out, int good_stdin, char **argv, char **envp);
|
||||
#endif
|
||||
|
||||
#ifdef _AMIGA
|
||||
|
|
|
@ -2472,7 +2472,7 @@ main (int argc, char **argv, char **envp)
|
|||
Therefore it may be the best solution simply to spawn the
|
||||
child process including all file handles and to wait for its
|
||||
termination. */
|
||||
int pid;
|
||||
pid_t pid;
|
||||
int r;
|
||||
pid = child_execute_job (NULL, 1, nargv, environ);
|
||||
|
||||
|
|
|
@ -707,7 +707,7 @@ vms_restore_symbol (const char *string);
|
|||
void remote_setup (void);
|
||||
void remote_cleanup (void);
|
||||
int start_remote_job_p (int);
|
||||
int start_remote_job (char **, char **, int, int *, int *, int *);
|
||||
int start_remote_job (char **, char **, int, int *, pid_t *, int *);
|
||||
int remote_status (int *, int *, int *, int);
|
||||
void block_remote_children (void);
|
||||
void unblock_remote_children (void);
|
||||
|
|
|
@ -136,7 +136,7 @@ start_remote_job_p (int first_p)
|
|||
|
||||
int
|
||||
start_remote_job (char **argv, char **envp, int stdin_fd,
|
||||
int *is_remote, int *id_ptr, int *used_stdin)
|
||||
int *is_remote, pid_t *id_ptr, int *used_stdin)
|
||||
{
|
||||
char waybill[MAX_DATA_SIZE], msg[128];
|
||||
struct hostent *host;
|
||||
|
@ -145,7 +145,7 @@ start_remote_job (char **argv, char **envp, int stdin_fd,
|
|||
int len;
|
||||
int retsock, retport, sock;
|
||||
Rpc_Stat status;
|
||||
int pid;
|
||||
pid_t pid;
|
||||
|
||||
/* Create the return socket. */
|
||||
retsock = Rpc_UdpCreate (True, 0);
|
||||
|
|
|
@ -53,7 +53,7 @@ start_remote_job_p (int first_p UNUSED)
|
|||
|
||||
int
|
||||
start_remote_job (char **argv UNUSED, char **envp UNUSED, int stdin_fd UNUSED,
|
||||
int *is_remote UNUSED, int *id_ptr UNUSED,
|
||||
int *is_remote UNUSED, pid_t *id_ptr UNUSED,
|
||||
int *used_stdin UNUSED)
|
||||
{
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue