diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-01-31 09:53:21 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:09:25 -0500 |
commit | 547d54a6debc390391d5fc4269d43f2d1f3443cc (patch) | |
tree | 42f7123ee3d392e33890b2ba3640435c50cb40a1 /source4/lib | |
parent | 9a70f446fc4abc2bd1278772810c0e8132f4bea4 (diff) | |
download | samba-547d54a6debc390391d5fc4269d43f2d1f3443cc.tar.gz samba-547d54a6debc390391d5fc4269d43f2d1f3443cc.tar.bz2 samba-547d54a6debc390391d5fc4269d43f2d1f3443cc.zip |
r5129: make sure we don't spin chewing CPU time due to my last change
(This used to be commit 69e97ad9c397261cd6edb6f7504021942f16c0ec)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/events.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/lib/events.c b/source4/lib/events.c index 3263be08f1..166cbe4509 100644 --- a/source4/lib/events.c +++ b/source4/lib/events.c @@ -290,7 +290,11 @@ int event_loop_once(struct event_context *ev) * sys_select() with something in the events * structure - for now just use select() */ - selrtn = select(ev->maxfd+1, &r_fds, &w_fds, NULL, &tval); + if (timeval_is_zero(&tval)) { + selrtn = select(ev->maxfd+1, &r_fds, &w_fds, NULL, NULL); + } else { + selrtn = select(ev->maxfd+1, &r_fds, &w_fds, NULL, &tval); + } t = timeval_current(); |