From a0aab76ae762614041720dd55d63ed3e0b7c1c94 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 10 Dec 2013 15:46:12 -0400 Subject: sync from git-annex --- Utility/ThreadScheduler.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Utility/ThreadScheduler.hs') diff --git a/Utility/ThreadScheduler.hs b/Utility/ThreadScheduler.hs index c3e871c..dbb6cb3 100644 --- a/Utility/ThreadScheduler.hs +++ b/Utility/ThreadScheduler.hs @@ -53,17 +53,20 @@ unboundDelay time = do {- Pauses the main thread, letting children run until program termination. -} waitForTermination :: IO () waitForTermination = do +#ifdef mingw32_HOST_OS + runEvery (Seconds 600) $ + void getLine +#else lock <- newEmptyMVar -#ifndef mingw32_HOST_OS let check sig = void $ installHandler sig (CatchOnce $ putMVar lock ()) Nothing check softwareTermination #ifndef __ANDROID__ whenM (queryTerminal stdInput) $ check keyboardSignal -#endif #endif takeMVar lock +#endif oneSecond :: Microseconds oneSecond = 1000000 -- cgit v1.2.3