static int pex_msdos_open (struct pex_obj *, const char *, int);
static int pex_msdos_open (struct pex_obj *, const char *, int);
static int pex_msdos_fdindex (struct pex_msdos *, int);
-static long pex_msdos_exec_child (struct pex_obj *, int, const char *,
- char * const *, int, int, int,
- const char **, int *);
+static pid_t pex_msdos_exec_child (struct pex_obj *, int, const char *,
+ char * const *, char * const *,
+ int, int, int, int,
+ int, const char **, int *);
static int pex_msdos_close (struct pex_obj *, int);
-static int pex_msdos_wait (struct pex_obj *, long, int *, struct pex_time *,
+static pid_t pex_msdos_wait (struct pex_obj *, pid_t, int *, struct pex_time *,
int, const char **, int *);
static void pex_msdos_cleanup (struct pex_obj *);
pex_msdos_wait,
NULL, /* pipe */
NULL, /* fdopenr */
+ NULL, /* fdopenw */
pex_msdos_cleanup
};
/* Execute a child. */
-static long
+static pid_t
pex_msdos_exec_child (struct pex_obj *obj, int flags, const char *executable,
- char * const * argv, int in, int out,
+ char * const * argv, char * const * env, int in, int out,
+ int toclose ATTRIBUTE_UNUSED,
int errdes ATTRIBUTE_UNUSED, const char **errmsg,
int *err)
{
free (scmd);
free (rf);
*errmsg = "cannot open temporary command file";
- return -1;
+ return (pid_t) -1;
}
for (i = 1; argv[i] != NULL; ++i)
free (scmd);
free (rf);
*errmsg = "system";
- return -1;
+ return (pid_t) -1;
}
remove (rf);
ms->statuses = XRESIZEVEC(int, ms->statuses, obj->count + 1);
ms->statuses[obj->count] = status;
- return obj->count;
+ return (pid_t) obj->count;
}
/* Wait for a child process to complete. Actually the child process
has already completed, and we just need to return the exit
status. */
-static int
-pex_msdos_wait (struct pex_obj *obj, long pid, int *status,
+static pid_t
+pex_msdos_wait (struct pex_obj *obj, pid_t pid, int *status,
struct pex_time *time, int done ATTRIBUTE_UNUSED,
const char **errmsg ATTRIBUTE_UNUSED,
int *err ATTRIBUTE_UNUSED)