* 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.
#endif
#ifndef HAVE_UNISTD_H
-int getpid ();
+pid_t getpid ();
#endif
\f
/* 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))
/* 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;
/* 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)
/* EMX: This function returns the pid of the child process. */
# ifdef __EMX__
-int
+pid_t
# else
void
# endif
#else /* !WINDOWS32 */
# ifdef __EMX__
- int pid;
+ pid_t pid;
# endif
/* Be the user, permanently. */
#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
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);
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);
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;
int len;
int retsock, retport, sock;
Rpc_Stat status;
- int pid;
+ pid_t pid;
/* Create the return socket. */
retsock = Rpc_UdpCreate (True, 0);
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;