From c3baa2ad6a7877ef1c2081d50903f3e513292339 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 30 Oct 2014 11:27:15 +0100 Subject: erts: Fix hanging in fd_stop on windows When reaping ports the flushReplyEvent is not signalled and therefore an errornous loop check caused the emulator to hang forever during shutdown. --- erts/emulator/sys/win32/sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erts/emulator/sys/win32/sys.c b/erts/emulator/sys/win32/sys.c index 0ded6b274e..62de462b93 100644 --- a/erts/emulator/sys/win32/sys.c +++ b/erts/emulator/sys/win32/sys.c @@ -2190,7 +2190,7 @@ static void fd_stop(ErlDrvData data) ASSERT(dp->out.flushEvent); SetEvent(dp->out.flushEvent); } while (WaitForSingleObject(dp->out.flushReplyEvent, 10) == WAIT_TIMEOUT - || !(dp->out.flags & DF_THREAD_FLUSHED)); + && !(dp->out.flags & DF_THREAD_FLUSHED)); } } -- cgit v1.2.3