From 2d30718caf0f081f72fa1b9f89bb8d53a06c7116 Mon Sep 17 00:00:00 2001 From: fcolin Date: Wed, 24 Mar 2004 10:10:15 +0000 Subject: Pb de mainloop TCL sous windows --- src/ivyloop.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/ivyloop.c') diff --git a/src/ivyloop.c b/src/ivyloop.c index c3022ab..9ccd427 100644 --- a/src/ivyloop.c +++ b/src/ivyloop.c @@ -192,3 +192,28 @@ void IvyMainLoop(void(*hook)(void)) } } +void IvyIdle() +{ + + fd_set rdset; + fd_set exset; + int ready; + struct timeval timeout = {0,0}; + + + ChannelDefferedDelete(); + rdset = open_fds; + exset = open_fds; + ready = select(64, &rdset, 0, &exset, &timeout); + if (ready < 0 && (errno != EINTR)) { + fprintf (stderr, "select error %d\n",errno); + perror("select"); + return; + } + if (ready > 0) { + IvyChannelHandleExcpt(&exset); + IvyChannelHandleRead(&rdset); + } + +} + -- cgit v1.1