summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
Diffstat (limited to 'games')
-rw-r--r--games/cribbage/instr.c4
-rw-r--r--games/sail/pl_1.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/games/cribbage/instr.c b/games/cribbage/instr.c
index b329e33..ed06ce8 100644
--- a/games/cribbage/instr.c
+++ b/games/cribbage/instr.c
@@ -58,8 +58,8 @@ void
instructions()
{
struct stat sb;
- union wait pstat;
pid_t pid;
+ int pstat;
char *pager, *path;
if (stat(_PATH_INSTR, &sb)) {
@@ -84,7 +84,7 @@ instructions()
do {
pid = waitpid(pid, (int *)&pstat, 0);
} while (pid == -1 && errno == EINTR);
- if (pid == -1 || pstat.w_status)
+ if (pid == -1 || WEXITSTATUS(pstat) || WTERMSIG(pstat))
exit(1);
}
}
diff --git a/games/sail/pl_1.c b/games/sail/pl_1.c
index e51f4f9..ee12e7f 100644
--- a/games/sail/pl_1.c
+++ b/games/sail/pl_1.c
@@ -126,8 +126,8 @@ choke()
void
child()
{
- union wait status;
- int pid;
+ pid_t pid;
+ int status;
(void) signal(SIGCHLD, SIG_IGN);
do {
OpenPOWER on IntegriCloud