From 9bb895bee5aec967b9e66c091b0edf596b70e900 Mon Sep 17 00:00:00 2001 From: Chris Jefferson Date: Sun, 22 Nov 2015 21:05:50 +0000 Subject: [PATCH 1/2] Fix timers going off late in cygwin --- src/sysfiles.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sysfiles.c b/src/sysfiles.c index 3294e78998..bacc8c7505 100644 --- a/src/sysfiles.c +++ b/src/sysfiles.c @@ -1463,7 +1463,7 @@ void SyStopAlarm(UInt *seconds, UInt *nanoseconds) { timer_settime(syTimer, 0, &tv, &buf); SyAlarmRunning = 0; - signal(TIMER_SIGNAL, SIG_DFL); + signal(TIMER_SIGNAL, SIG_IGN); if (seconds) *seconds = (UInt)buf.it_value.tv_sec; @@ -1529,7 +1529,7 @@ void SyInstallAlarm ( UInt seconds, UInt nanoseconds ) SyAlarmRunning = 1; SyAlarmHasGoneOff = 0; if (setitimer(ITIMER_VIRTUAL, &tv, NULL)) { - signal(SIGVTALRM, SIG_DFL); + signal(SIGVTALRM, SIG_IGN); ErrorReturnVoid("Could not set interval timer", 0L, 0L, "you can return to ignore"); } return; @@ -1544,7 +1544,7 @@ void SyStopAlarm(UInt *seconds, UInt *nanoseconds) { setitimer(ITIMER_VIRTUAL, &tv, &buf); SyAlarmRunning = 0; - signal(SIGVTALRM, SIG_DFL); + signal(SIGVTALRM, SIG_IGN); if (seconds) *seconds = (UInt)buf.it_value.tv_sec; From 9390d588a3a70d88576de856214a6c2b54ab8446 Mon Sep 17 00:00:00 2001 From: Chris Jefferson Date: Wed, 9 Dec 2015 21:58:17 +0000 Subject: [PATCH 2/2] Extend timeout, to avoid cygwin issues --- tst/testinstall/timeout.tst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tst/testinstall/timeout.tst b/tst/testinstall/timeout.tst index de98ca86b8..4f5a55432f 100644 --- a/tst/testinstall/timeout.tst +++ b/tst/testinstall/timeout.tst @@ -13,13 +13,13 @@ gap> spinFor(10,0); 0 gap> CallWithTimeout(50000,spinFor,1); [ ] -gap> CallWithTimeout(5000,spinFor,10000); +gap> CallWithTimeout(5000,spinFor,50000); fail gap> CallWithTimeout(50000,spinFor,1,1); [ 1 ] gap> CallWithTimeoutList(50000,spinFor,[1,1]); [ 1 ] -gap> CallWithTimeoutList(5000,spinFor,[10000,1]); +gap> CallWithTimeoutList(5000,spinFor,[50000,1]); fail gap> CallWithTimeoutList(50000,spinFor,[1]); [ ]