diff options
| author | tgoodwin <tgoodwin> | 1998-07-27 13:27:34 +0000 |
|---|---|---|
| committer | Toby Goodwin <toby@paccrat.org> | 2015-05-16 21:23:11 +0100 |
| commit | 7682867936110840720bc20e3a73ade7a322c375 (patch) | |
| tree | 72855719025b3110d2ad6d55b046460d2a8fe85d | |
| parent | d3102fa7de519677c917beb108a71b81ef9a8abc (diff) | |
move <sys/wait.h> magic into "wait.h"
| -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 */ |