#include "squid.h"
#include "fd.h"
#include "fde.h"
#include "fs_io.h"
#include "globals.h"
#include "SquidConfig.h"
#include "SquidIpc.h"
#include "StatCounters.h"
#include "store/Disk.h"
#include "tools.h"
#include "unlinkd.h"
#include <chrono>
#include <thread>
![](unlinkd_8cc__incl.png)
Go to the source code of this file.
Macros | |
#define | UNLINKD_QUEUE_LIMIT 20 |
Functions | |
void | unlinkdUnlink (const char *path) |
void | unlinkdClose (void) |
bool | unlinkdNeeded (void) |
void | unlinkdInit (void) |
Variables | |
static int | unlinkd_wfd = -1 |
static int | unlinkd_rfd = -1 |
static void * | hIpc |
static pid_t | pid |
Macro Definition Documentation
◆ UNLINKD_QUEUE_LIMIT
#define UNLINKD_QUEUE_LIMIT 20 |
Definition at line 36 of file unlinkd.cc.
Function Documentation
◆ unlinkdClose()
void unlinkdClose | ( | void | ) |
Definition at line 133 of file unlinkd.cc.
References comm_close, DBG_IMPORTANT, debugs, getCurrentTime(), hIpc, pid, unlinkd_rfd, and unlinkd_wfd.
Referenced by SquidShutdown().
◆ unlinkdInit()
void unlinkdInit | ( | void | ) |
Definition at line 193 of file unlinkd.cc.
References assert, commUnsetFdTimeout(), commUnsetNonBlocking(), Config, DBG_IMPORTANT, debugs, fatal(), fd_note(), FD_PIPE, fd_table, hIpc, IPC_FIFO, IPC_STREAM, IPC_TCP_SOCKET, ipcCreate(), pid, SquidConfig::Program, Ip::Address::setLocalhost(), SquidConfig::unlinkd, unlinkd_rfd, and unlinkd_wfd.
Referenced by mainInitialize(), and mainReconfigureFinish().
◆ unlinkdNeeded()
bool unlinkdNeeded | ( | void | ) |
Definition at line 180 of file unlinkd.cc.
References SquidConfig::cacheSwap, Config, Store::DiskConfig::n_configured, Store::DiskConfig::swapDirs, and Store::Disk::unlinkdUseful().
Referenced by mainInitialize(), and mainReconfigureFinish().
◆ unlinkdUnlink()
void unlinkdUnlink | ( | const char * | path | ) |
Definition at line 39 of file unlinkd.cc.
References assert, DBG_IMPORTANT, debug_trap(), debugs, StatCounters::disk, MAXPATHLEN, CachePeer::path, StatCounters::requests, safeunlink(), statCounter, StatCounters::syscalls, StatCounters::unlink, UNLINKD_QUEUE_LIMIT, unlinkd_rfd, unlinkd_wfd, xstrerr(), and xstrncpy().
Referenced by IpcIoIOStrategy::unlinkFile(), MmappedIOStrategy::unlinkFile(), BlockingIOStrategy::unlinkFile(), and DiskdIOStrategy::unlinkFile().
Variable Documentation
◆ hIpc
|
static |
Definition at line 33 of file unlinkd.cc.
Referenced by unlinkdClose(), and unlinkdInit().
◆ pid
|
static |
Definition at line 34 of file unlinkd.cc.
Referenced by unlinkdClose(), and unlinkdInit().
◆ unlinkd_rfd
|
static |
Definition at line 31 of file unlinkd.cc.
Referenced by unlinkdClose(), unlinkdInit(), and unlinkdUnlink().
◆ unlinkd_wfd
|
static |
Definition at line 30 of file unlinkd.cc.
Referenced by unlinkdClose(), unlinkdInit(), and unlinkdUnlink().
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products