diff options
author | hobbs <hobbs@noemail.net> | 2000-01-11 22:08:50 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2000-01-11 22:08:50 (GMT) |
commit | d5406d280071c162b6ac0a8d4ca62f69a75909cc (patch) | |
tree | a8514ec487067c03fa214513633bab29317dfc5a /compat/waitpid.c | |
parent | b52ceb526ad0b6b6f0135204f9aafd74c259a041 (diff) | |
download | tcl-d5406d280071c162b6ac0a8d4ca62f69a75909cc.zip tcl-d5406d280071c162b6ac0a8d4ca62f69a75909cc.tar.gz tcl-d5406d280071c162b6ac0a8d4ca62f69a75909cc.tar.bz2 |
* compat/waitpid.c: use pid_t type instead of int [Bug: 3999]
FossilOrigin-Name: 3b711e6b6a216303aee421259a9f02b0f72e9932
Diffstat (limited to 'compat/waitpid.c')
-rw-r--r-- | compat/waitpid.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/compat/waitpid.c b/compat/waitpid.c index 1069f56..00113cf 100644 --- a/compat/waitpid.c +++ b/compat/waitpid.c @@ -12,12 +12,16 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: waitpid.c,v 1.2 1998/09/14 18:39:45 stanton Exp $ + * RCS: @(#) $Id: waitpid.c,v 1.3 2000/01/11 22:08:50 hobbs Exp $ */ #include "tclInt.h" #include "tclPort.h" +#ifndef pid_t +#define pid_t int +#endif + /* * A linked list of the following structures is used to keep track * of processes for which we received notification from the kernel, @@ -28,7 +32,7 @@ */ typedef struct WaitInfo { - int pid; /* Pid of process that exited. */ + pid_t pid; /* Pid of process that exited. */ WAIT_STATUS_TYPE status; /* Status returned when child exited * or suspended. */ struct WaitInfo *nextPtr; /* Next in list of exited processes. */ @@ -64,9 +68,9 @@ static WaitInfo *deadList = NULL; /* First in list of all dead # undef waitpid #endif -int +pid_t waitpid(pid, statusPtr, options) - int pid; /* The pid to wait on. Must be -1 or + pid_t pid; /* The pid to wait on. Must be -1 or * greater than zero. */ int *statusPtr; /* Where to store wait status for the * process. */ @@ -74,7 +78,7 @@ waitpid(pid, statusPtr, options) * WUNTRACED. */ { register WaitInfo *waitPtr, *prevPtr; - int result; + pid_t result; WAIT_STATUS_TYPE status; if ((pid < -1) || (pid == 0)) { |