From: Matt Birkholz Date: Fri, 19 Dec 2014 16:56:32 +0000 (-0700) Subject: Use INTERRUPTABLE_EXTENT in OS_pause when !HAVE_SIGSUSPEND. X-Git-Tag: mit-scheme-pucked-9.2.12~376^2~103 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=4409257c9c3149f3b0981ca31cbc9e7d7b4477d2;p=mit-scheme.git Use INTERRUPTABLE_EXTENT in OS_pause when !HAVE_SIGSUSPEND. --- diff --git a/src/microcode/uxio.c b/src/microcode/uxio.c index bb681d133..8bbb260bc 100644 --- a/src/microcode/uxio.c +++ b/src/microcode/uxio.c @@ -874,12 +874,16 @@ OS_pause (void) n = SELECT_INTERRUPT; } UX_sigprocmask (SIG_SETMASK, &old, NULL); - return (n); -#else - /* Wait-for-io must spin. */ - return - ((OS_process_any_status_change ()) - ? SELECT_PROCESS_STATUS_CHANGE - : SELECT_INTERRUPT); +#else /* not HAVE_SIGSUSPEND */ + INTERRUPTABLE_EXTENT + (n, (((OS_process_any_status_change ()) + || (pending_interrupts_p ())) + ? ((errno = EINTR), (-1)) + : ((UX_pause ()), (0)))); + if (OS_process_any_status_change()) + n = SELECT_PROCESS_STATUS_CHANGE; + else + n = SELECT_INTERRUPT; #endif + return (n); }