[PATCH xinit 05/14] waitpid(2) is in Unix98

Mikhail Gusarov dottedmag at dottedmag.net
Tue Apr 13 13:03:20 PDT 2010


Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net>
---
 xinit.c |   18 ------------------
 1 files changed, 0 insertions(+), 18 deletions(-)

diff --git a/xinit.c b/xinit.c
index 4b10eb6..ead06a9 100644
--- a/xinit.c
+++ b/xinit.c
@@ -115,13 +115,7 @@ static char **client = clientargv + 2;        /* make sure room for sh .xinitrc
 static char *displayNum = NULL;
 static char *program = NULL;
 static Display *xd = NULL;            /* server connection */
-#ifndef SYSV
-#if defined(__CYGWIN__) || defined(SVR4) || defined(_POSIX_SOURCE) || defined(CSRG_BASED) || defined(__APPLE__)
 int status;
-#else
-union wait    status;
-#endif
-#endif /* SYSV */
 int serverpid = -1;
 int clientpid = -1;
 volatile int gotSignal = 0;
@@ -403,20 +397,8 @@ processTimeout(int timeout, char *string)
     static char    *laststring;
 
     for (;;) {
-#if defined(SYSV)
-        alarm(1);
-        if ((pidfound = wait(NULL)) == serverpid)
-            break;
-        alarm(0);
-#else /* SYSV */
-#if defined(SVR4) || defined(_POSIX_SOURCE) || defined(__APPLE__)
         if ((pidfound = waitpid(serverpid, &status, WNOHANG)) == serverpid)
             break;
-#else
-        if ((pidfound = wait3(&status, WNOHANG, NULL)) == serverpid)
-            break;
-#endif
-#endif /* SYSV */
         if (timeout) {
             if (i == 0 && string != laststring)
                 fprintf(stderr, "\r\nwaiting for %s ", string);
-- 
1.7.0



More information about the xorg-devel mailing list