changed ash to use pid_t
This commit is contained in:
parent
3e5276eff7
commit
f5c56f3f24
3 changed files with 7 additions and 6 deletions
|
@ -75,10 +75,10 @@ static char sccsid[] = "@(#)jobs.c 5.1 (Berkeley) 3/7/91";
|
||||||
|
|
||||||
struct job *jobtab; /* array of jobs */
|
struct job *jobtab; /* array of jobs */
|
||||||
int njobs; /* size of array */
|
int njobs; /* size of array */
|
||||||
MKINIT short backgndpid = -1; /* pid of last background process */
|
MKINIT pid_t backgndpid = -1; /* pid of last background process */
|
||||||
#if JOBS
|
#if JOBS
|
||||||
int initialpgrp; /* pgrp of shell on invocation */
|
int initialpgrp; /* pgrp of shell on invocation */
|
||||||
short curjob; /* current job */
|
pid_t curjob; /* current job */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct procstat {
|
struct procstat {
|
||||||
short pid; /* process id */
|
pid_t pid; /* process id */
|
||||||
short status; /* status flags (defined above) */
|
short status; /* status flags (defined above) */
|
||||||
char *cmd; /* text of command being run */
|
char *cmd; /* text of command being run */
|
||||||
};
|
};
|
||||||
|
@ -64,8 +64,8 @@ struct procstat {
|
||||||
struct job {
|
struct job {
|
||||||
struct procstat ps0; /* status of process */
|
struct procstat ps0; /* status of process */
|
||||||
struct procstat *ps; /* status or processes when more than one */
|
struct procstat *ps; /* status or processes when more than one */
|
||||||
short nprocs; /* number of processes */
|
pid_t nprocs; /* number of processes */
|
||||||
short pgrp; /* process group of this job */
|
pid_t pgrp; /* process group of this job */
|
||||||
char state; /* true if job is finished */
|
char state; /* true if job is finished */
|
||||||
char used; /* true if this entry is in used */
|
char used; /* true if this entry is in used */
|
||||||
char changed; /* true if status has changed */
|
char changed; /* true if status has changed */
|
||||||
|
@ -74,7 +74,7 @@ struct job {
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
extern short backgndpid; /* pid of last background process */
|
extern pid_t backgndpid; /* pid of last background process */
|
||||||
|
|
||||||
|
|
||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
|
|
|
@ -85,6 +85,7 @@ typedef char *pointer;
|
||||||
#define MKINIT /* empty */
|
#define MKINIT /* empty */
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
extern char nullstr[1]; /* null string */
|
extern char nullstr[1]; /* null string */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue