summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-08-24 14:46:33 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-08-24 14:46:33 -0700
commit5250190bd436b5b762ebb57452d15dff5ae6a24a (patch)
tree0b04f30c504a19865c0f90d31ed2e56a19f1e081
parent14ea26b8dc0c601e445331e09a4cc9ca082a1345 (diff)
Use pid_t instead of int for type of pids
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xinit.c17
1 files changed, 9 insertions, 8 deletions
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();