diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2006-07-14 15:11:08 -0700 |
---|---|---|
committer | Alan Coopersmith <alanc@alf.(none)> | 2006-07-14 15:11:08 -0700 |
commit | 2094955be1ef94a0ba3f7dcf64ae04c9575dbd9c (patch) | |
tree | dfb7668beea258fefe12f06264d58eec2a0290a3 | |
parent | 1abe7027403ecf00b846c675fac27c2d86ebd9d4 (diff) |
Use pid_t instead of int when working with fork/wait/etc. (clear more lint warnings)
-rw-r--r-- | dm.c | 10 | ||||
-rw-r--r-- | dm.h | 8 | ||||
-rw-r--r-- | dpylist.c | 4 | ||||
-rw-r--r-- | server.c | 8 | ||||
-rw-r--r-- | session.c | 16 | ||||
-rw-r--r-- | xdmshell.c | 2 |
6 files changed, 24 insertions, 24 deletions
@@ -88,7 +88,7 @@ static void ScanServers (void); static void SetAccessFileTime (void); static void SetConfigFileTime (void); static void StartDisplays (void); -static void TerminateProcess (int pid, int signal); +static void TerminateProcess (pid_t pid, int signal); volatile int Rescan; static long ServersModTime, ConfigModTime, AccessFileModTime; @@ -106,7 +106,7 @@ static SIGVAL ChildNotify (int n); static int StorePid (void); -static int parent_pid = -1; /* PID of parent xdm process */ +static pid_t parent_pid = -1; /* PID of parent xdm process */ int main (int argc, char **argv) @@ -422,7 +422,7 @@ ChildNotify (int n) void WaitForChild (void) { - int pid; + pid_t pid; struct display *d; waitType status; #if !defined(X_NOT_POSIX) && !defined(__UNIXOS2__) @@ -625,7 +625,7 @@ StartDisplays (void) void StartDisplay (struct display *d) { - int pid; + pid_t pid; Debug ("StartDisplay %s\n", d->name); LoadServerResources (d); @@ -695,7 +695,7 @@ StartDisplay (struct display *d) } static void -TerminateProcess (int pid, int signal) +TerminateProcess (pid_t pid, int signal) { kill (pid, signal); #ifdef SIGCONT @@ -175,8 +175,8 @@ struct display { /* display state */ DisplayStatus status; /* current status */ - int pid; /* process id of child */ - int serverPid; /* process id of server (-1 if none) */ + pid_t pid; /* process id of child */ + pid_t serverPid; /* process id of server (-1 if none) */ FileState state; /* state during HUP processing */ int startTries; /* current start try */ Time_t lastCrash; /* time of last crash */ @@ -331,8 +331,8 @@ extern int choiceTimeout; /* chooser choice timeout */ extern struct display *FindDisplayByName (char *name), *FindDisplayBySessionID (CARD32 sessionID), *FindDisplayByAddress (XdmcpNetaddr addr, int addrlen, CARD16 displayNumber), - *FindDisplayByPid (int pid), - *FindDisplayByServerPid (int serverPid), + *FindDisplayByPid (pid_t pid), + *FindDisplayByServerPid (pid_t serverPid), *NewDisplay (char *name, char *class); extern struct protoDisplay *FindProtoDisplay ( @@ -69,7 +69,7 @@ FindDisplayByName (char *name) } struct display * -FindDisplayByPid (int pid) +FindDisplayByPid (pid_t pid) { struct display *d; @@ -80,7 +80,7 @@ FindDisplayByPid (int pid) } struct display * -FindDisplayByServerPid (int serverPid) +FindDisplayByServerPid (pid_t serverPid) { struct display *d; @@ -49,7 +49,7 @@ from The Open Group. static int receivedUsr1; -static int serverPause (unsigned t, int serverPid); +static int serverPause (unsigned t, pid_t serverPid); static Display *dpy; @@ -79,7 +79,7 @@ StartServerOnce (struct display *d) char **f; char **argv; char arg[1024]; - int pid; + pid_t pid; Debug ("StartServer for %s\n", d->name); receivedUsr1 = 0; @@ -170,9 +170,9 @@ serverPauseUsr1 (int n) } static int -serverPause (unsigned t, int serverPid) +serverPause (unsigned t, pid_t serverPid) { - int pid; + pid_t pid; serverPauseRet = 0; if (!Setjmp (pauseAbort)) { @@ -171,11 +171,11 @@ static struct dlfuncs dlfuncs = { static Bool StartClient( struct verify_info *verify, struct display *d, - int *pidp, + pid_t *pidp, char *name, char *passwd); -static int clientPid; +static pid_t clientPid; static struct greet_info greet; static struct verify_info verify; @@ -211,11 +211,11 @@ waitAbort (int n) #endif static void -AbortClient (int pid) +AbortClient (pid_t pid) { int sig = SIGTERM; volatile int i; - int retId; + pid_t retId; for (i = 0; i < 4; i++) { if (killpg (pid, sig) == -1) { @@ -281,7 +281,7 @@ ErrorHandler(Display *dpy, XErrorEvent *event) void ManageSession (struct display *d) { - static int pid = 0; + static pid_t pid = 0; Display *dpy; greet_user_rtn greet_stat; static GreetUserProc greet_user_proc = NULL; @@ -534,13 +534,13 @@ static Bool StartClient ( struct verify_info *verify, struct display *d, - int *pidp, + pid_t *pidp, char *name, char *passwd) { char **f, *home; char *failsafeArgv[2]; - int pid; + pid_t pid; #ifdef HAS_SETUSERCONTEXT struct passwd* pwd; #endif @@ -832,7 +832,7 @@ source (char **environ, char *file) static int runAndWait (char **args, char **environ) { - int pid; + pid_t pid; waitType result; switch (pid = fork ()) { @@ -71,7 +71,7 @@ static int exec_args ( char *filename, char **args) { - int pid; + pid_t pid; waitType status; if (!filename) return -1; |