Unlinkd is used only by UFS storage. Bug before the change, Squid
always started unlinkd if it is built, even if it is not needed.
Moreover, unlinkd was started in non-daemon mode.
The patch adds unlinks() method for SwapDir to determine if it uses
unlinkd. Unlinkd is started iff:
* Squid is running in daemon mode
* a configured cache_dir uses unlinkd
After the change, unlinkdClose() may be called when unlinkd was never
started. The patch removes a warning which was printed in this case
on Windows.
--- src/SwapDir.h | 2 ++ src/fs/ufs/store_dir_ufs.cc | 6 ++++++ src/fs/ufs/ufscommon.h | 1 + src/main.cc | 3 ++- src/protos.h | 1 + src/unlinkd.cc | 21 +++++++++++++++++++-- 6 files changed, 31 insertions(+), 3 deletions(-)
This archive was generated by hypermail 2.2.0 : Fri Oct 07 2011 - 12:00:04 MDT