summaryrefslogtreecommitdiff
path: root/src/ivyloop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ivyloop.c')
-rw-r--r--src/ivyloop.c25
1 files changed, 25 insertions, 0 deletions
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);
+ }
+
+}
+