From 5250190bd436b5b762ebb57452d15dff5ae6a24a Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 24 Aug 2013 14:46:33 -0700 Subject: Use pid_t instead of int for type of pids Signed-off-by: Alan Coopersmith --- xinit.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'xinit.c') diff --git a/xinit.c b/xinit.c index eec4a2b..18e3e10 100644 --- a/xinit.c +++ b/xinit.c @@ -101,15 +101,15 @@ static char *displayNum = NULL; static char *program = NULL; static Display *xd = NULL; /* server connection */ int status; -int serverpid = -1; -int clientpid = -1; +pid_t serverpid = -1; +pid_t clientpid = -1; volatile int gotSignal = 0; static void Execute(char **vec); static Bool waitforserver(void); static Bool processTimeout(int timeout, const char *string); -static int startServer(char *server[]); -static int startClient(char *client[]); +static pid_t startServer(char *server[]); +static pid_t startClient(char *client[]); static int ignorexio(Display *dpy); static void shutdown(void); static void set_environment(void); @@ -149,7 +149,7 @@ main(int argc, char *argv[]) register char **sptr = server; register char **cptr = client; register char **ptr; - int pid; + pid_t pid; int client_given = 0, server_given = 0; int client_args_given = 0, server_args_given = 0; int start_of_client_args, start_of_server_args; @@ -366,7 +366,8 @@ waitforserver(void) static Bool processTimeout(int timeout, const char *string) { - int i = 0, pidfound = -1; + int i = 0; + pid_t pidfound = -1; static const char *laststring; for (;;) { @@ -388,7 +389,7 @@ processTimeout(int timeout, const char *string) return (serverpid != pidfound); } -static int +static pid_t startServer(char *server[]) { sigset_t mask, old; @@ -554,7 +555,7 @@ setWindowPath(void) free(newwindowpath); } -static int +static pid_t startClient(char *client[]) { clientpid = fork(); -- cgit v1.2.3