1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-29 21:21:08 +00:00

Add check for defined(WAITINT) to control whether wait status is int * for cases where SYSVONLY isn't appropriate

This commit is contained in:
Nick Briggs
2017-05-24 18:02:35 -07:00
parent 0557f1a4cd
commit 8adfe96bd2

View File

@@ -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;