From 8adfe96bd2b07fdf3300fac2cec4e1dbc36298c4 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Wed, 24 May 2017 18:02:35 -0700 Subject: [PATCH] Add check for defined(WAITINT) to control whether wait status is int * for cases where SYSVONLY isn't appropriate --- src/unixfork.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/unixfork.c b/src/unixfork.c index 0b98799..6fda9c9 100755 --- a/src/unixfork.c +++ b/src/unixfork.c @@ -450,7 +450,7 @@ fork_Unix() case 'W': /* Wait for a process to die. */ { int pid; -#ifdef SYSVONLY +#if defined(SYSVONLY) || defined(WAITINT) int status; #else union wait status; @@ -458,7 +458,7 @@ fork_Unix() int slot; -#ifdef SYSVONLY +#if defined(SYSVONLY) || defined(WAITINT) status = 0; #else status.w_status = 0; @@ -478,7 +478,7 @@ fork_Unix() { /* Ignore processes which are suspended but haven't exited (this shouldn't happen) */ -#ifdef SYSVONLY +#if defined(SYSVONLY) || defined(WAITINT) if (WIFSTOPPED(status )) break; IOBuf[3] = status >>8; IOBuf[2] = status & 0xFF;