update mch_suspend

Use the portable uv_kill.
Don't bother with archaic BeOS.
This commit is contained in:
Scott Prager
2014-09-17 22:24:39 -04:00
parent 8d271bb57b
commit d5ea183633

View File

@@ -88,17 +88,16 @@ static int did_set_icon = FALSE;
*/ */
void mch_suspend(void) void mch_suspend(void)
{ {
/* BeOS does have SIGTSTP, but it doesn't work. */ #if defined(SIGTSTP)
#if defined(SIGTSTP) && !defined(__BEOS__)
out_flush(); /* needed to make cursor visible on some systems */ out_flush(); /* needed to make cursor visible on some systems */
settmode(TMODE_COOK); settmode(TMODE_COOK);
out_flush(); /* needed to disable mouse on some systems */ out_flush(); /* needed to disable mouse on some systems */
// Note: compiler defines _REENTRANT when given -pthread flag.
# if defined(_REENTRANT) && defined(SIGCONT) # if defined(_REENTRANT) && defined(SIGCONT)
sigcont_received = FALSE; sigcont_received = FALSE;
# endif # endif
kill(0, SIGTSTP); /* send ourselves a STOP signal */ uv_kill(0, SIGTSTP); // send ourselves a STOP signal
# if defined(_REENTRANT) && defined(SIGCONT) # if defined(_REENTRANT) && defined(SIGCONT)
/* /*
* Wait for the SIGCONT signal to be handled. It generally happens * Wait for the SIGCONT signal to be handled. It generally happens