From: adrian <> Date: Sun, 10 Sep 2006 09:49:05 +0000 (+0000) Subject: reverse last patch - i missed that the fd_set includes the X-Git-Tag: SQUID_3_0_PRE5~100 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7a67ff135d1be666eb1cb584474f6b02a6f58d5;p=thirdparty%2Fsquid.git reverse last patch - i missed that the fd_set includes the unlinkd fd. I'll rethink how to fix this. --- diff --git a/src/unlinkd.cc b/src/unlinkd.cc index 225738d004..c027d8c091 100644 --- a/src/unlinkd.cc +++ b/src/unlinkd.cc @@ -1,6 +1,6 @@ /* - * $Id: unlinkd.cc,v 1.57 2006/09/10 03:20:37 adrian Exp $ + * $Id: unlinkd.cc,v 1.58 2006/09/10 03:49:05 adrian Exp $ * * DEBUG: section 2 Unlink Daemon * AUTHOR: Duane Wessels @@ -111,7 +111,14 @@ unlinkdUnlink(const char *path) * of the CPU's time. */ if (queuelen >= UNLINKD_QUEUE_LIMIT) { - usleep(100000); + + struct timeval to; + fd_set R; + FD_ZERO(&R); + FD_SET(unlinkd_rfd, &R); + to.tv_sec = 0; + to.tv_usec = 100000; + select(unlinkd_rfd + 1, &R, NULL, NULL, &to); } /*