From 9e3506ab60a88bcd2d61b3fee95a0b1882d6ee93 Mon Sep 17 00:00:00 2001 From: tjr Date: Thu, 18 Jul 2002 10:22:42 +0000 Subject: Avoid using ints or shorts to store process id's, use pid_t instead. The pgrp member of struct job was declared as a short and could not store every possible process group ID value, the rest of them were benign because pid_t happens to be an int. --- bin/sh/jobs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/sh/jobs.h') diff --git a/bin/sh/jobs.h b/bin/sh/jobs.h index 5bc32eb..53c0ba0 100644 --- a/bin/sh/jobs.h +++ b/bin/sh/jobs.h @@ -67,7 +67,7 @@ struct job { struct procstat ps0; /* status of process */ struct procstat *ps; /* status or processes when more than one */ short 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 used; /* true if this entry is in used */ char changed; /* true if status has changed */ @@ -92,7 +92,7 @@ void showjobs(int, int, int); int waitcmd(int, char **); int jobidcmd(int, char **); struct job *makejob(union node *, int); -int forkshell(struct job *, union node *, int); +pid_t forkshell(struct job *, union node *, int); int waitforjob(struct job *, int *); int stoppedjobs(void); char *commandtext(union node *); -- cgit v1.1