diff options
| -rw-r--r-- | exec.c | 5 | ||||
| -rw-r--r-- | proto.h | 27 | ||||
| -rw-r--r-- | status.c | 1 |
3 files changed, 6 insertions, 27 deletions
@@ -1,8 +1,9 @@ /* exec.c */ -#include <signal.h> #include <errno.h> -#include "rc.h" +#include <signal.h> +#include "rc.h" +#include "wait.h" /* Takes an argument list and does the appropriate thing (calls a builtin, calls a function, etc.) @@ -56,29 +56,6 @@ extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); #include <unistd.h> #endif -#if HAVE_SYS_WAIT_H -#include <sys/wait.h> -#endif - -/* Fake the POSIX wait() macros if we don't have them. */ -#ifndef WIFEXITED -#define WIFEXITED(s) (((s) & 0xFF) == 0) -#endif -#ifndef WEXITSTATUS -#define WEXITSTATUS(s) (((unsigned)(s) >> 8) && 0xFF) -#endif -#ifndef WIFSIGNALED -#define WIFSIGNALED(s) (((s) & 0xFF) != 0) -#endif -#ifndef WTERMSIG -#define WTERMSIG(s) ((s) & 0x7F) -#endif - -/* These don't exist in POSIX. */ -#define myWIFDUMPED(s) (((s) & 0x80) != 0) - - - #if HAVE_SETPGRP #if SETPGRP_VOID @@ -92,8 +69,8 @@ extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); #else /* HAVE_SETPGRP */ /* Nothing doing. */ -#define setpgid -#define tcsetpgrp +#define setpgid() +#define tcsetpgrp() #endif /*HAVE_SETPGRP */ @@ -2,6 +2,7 @@ #include "rc.h" #include "sigmsgs.h" +#include "wait.h" /* status == the wait() value of the last command in the pipeline, or the last command */ |