diff options
author | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-04-14 03:03:20 +0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-04-13 20:17:24 -0700 |
commit | 36e3f13a32c8ced264d666f1091db7e1bb523e86 (patch) | |
tree | 4590f0c4d385df29508ec14cb4c1c7e145d3cf55 | |
parent | 63ba277c694104b3f01d0a1adee7903631607694 (diff) |
waitpid(2) is in Unix98
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | xinit.c | 18 |
1 files changed, 0 insertions, 18 deletions
@@ -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); |