summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu.herrb@laas.fr>2013-11-02 17:10:42 +0100
committerMatthieu Herrb <matthieu.herrb@laas.fr>2013-11-02 17:10:42 +0100
commitd8e330be967c4f9820a499b0641352a529a86889 (patch)
treec715acd35b68a3dfe847095f88c1c2f4ae20c8f8
parentb1d08065098a889d44e317fe699c4fb39c30558d (diff)
parent182920f156c87715d91b2f64b8781a0072af996e (diff)
Merge remote-tracking branch 'origin/master' into obsd
-rw-r--r--COPYING27
-rw-r--r--configure.ac2
-rw-r--r--xinit.c31
3 files changed, 44 insertions, 16 deletions
diff --git a/COPYING b/COPYING
index 8db1bec..821341a 100644
--- a/COPYING
+++ b/COPYING
@@ -19,3 +19,30 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
+
+Copyright (c) 2008-2012 Apple Inc.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation files
+(the "Software"), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of the Software,
+and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
+HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name(s) of the above
+copyright holders shall not be used in advertising or otherwise to
+promote the sale, use or other dealings in this Software without
+prior written authorization.
diff --git a/configure.ac b/configure.ac
index 419f9ca..b464d68 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@ dnl Process this file with autoconf to create configure.
# Initialize Autoconf
AC_PREREQ([2.60])
-AC_INIT([xinit], [1.3.2],
+AC_INIT([xinit], [1.3.3],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xinit])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
diff --git a/xinit.c b/xinit.c
index eec4a2b..1b04911 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,8 +389,8 @@ processTimeout(int timeout, const char *string)
return (serverpid != pidfound);
}
-static int
-startServer(char *server[])
+static pid_t
+startServer(char *server_argv[])
{
sigset_t mask, old;
const char * const *cpp;
@@ -421,12 +422,12 @@ startServer(char *server[])
* if client is xterm -L
*/
setpgid(0,getpid());
- Execute(server);
+ Execute(server_argv);
- Error("unable to run server \"%s\"", server[0]);
+ Error("unable to run server \"%s\"", server_argv[0]);
fprintf(stderr, "Use the -- option, or make sure that %s is in your path and\n", bindir);
- fprintf(stderr, "that \"%s\" is a program or a link to the right type of server\n", server[0]);
+ fprintf(stderr, "that \"%s\" is a program or a link to the right type of server\n", server_argv[0]);
fprintf(stderr, "for your display. Possible server names include:\n\n");
for (cpp = server_names; *cpp; cpp++)
fprintf(stderr, " %s\n", *cpp);
@@ -554,8 +555,8 @@ setWindowPath(void)
free(newwindowpath);
}
-static int
-startClient(char *client[])
+static pid_t
+startClient(char *client_argv[])
{
clientpid = fork();
if (clientpid == 0) {
@@ -567,8 +568,8 @@ startClient(char *client[])
_exit(EXIT_FAILURE);
}
setpgid(0, getpid());
- Execute(client);
- Error("Unable to run program \"%s\"", client[0]);
+ Execute(client_argv);
+ Error("Unable to run program \"%s\"", client_argv[0]);
fprintf(stderr, "Specify a program on the command line or make sure that %s\n", bindir);
fprintf(stderr, "is in your path.\n\n");