From 84c80a7b343291f7b760a4afb98cb394f669d18a Mon Sep 17 00:00:00 2001 From: henri Date: Fri, 26 Oct 2012 09:40:14 +0000 Subject: [PATCH] Make ncat unconditionally use the select engine on windows. WSAPoll() can't handle read events on stdin. This is a workaround intended to mitigate the issue until we implement a fpoll function in nbase. --- ncat/ncat_connect.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ncat/ncat_connect.c b/ncat/ncat_connect.c index 0114ae70b..5fd0a86d9 100644 --- a/ncat/ncat_connect.c +++ b/ncat/ncat_connect.c @@ -489,6 +489,13 @@ int ncat_connect(void) * the use of the select-based engine. */ if (stdin_is_reg()) nsock_set_default_engine("select"); +#elif defined(WIN32) + /* -- Hack!! + * Unconditionally use the select engine on windows. + * The poll engine (WSAPoll) is currently unable to handle + * read events on stdin. + */ + nsock_set_default_engine("select"); #endif /* Create an nsock pool */