38#define UNLINKD_QUEUE_LIMIT 20
45 static int queuelen = 0;
60#if defined(USE_EPOLL) || defined(USE_KQUEUE) || defined(USE_DEVPOLL)
66 std::this_thread::sleep_for(std::chrono::milliseconds(10));
94 rbuf[bytes_read] =
'\0';
96 for (i = 0; i < bytes_read; ++i)
111 if (bytes_written < 0) {
116 }
else if (bytes_written != l) {
151 if (WaitForSingleObject(
hIpc, 5000) != WAIT_OBJECT_0) {
185 if (sd->unlinkdUseful())
201 args[0] =
"(unlinkd)";
225 fatal(
"Failed to create unlinkd subprocess");
227 std::this_thread::sleep_for(std::chrono::milliseconds(250));
252 debugs(2, 4,
"Unlinkd handle: 0x" << std::hex <<
hIpc << std::dec <<
", PID: " <<
pid);
struct SquidConfig::@83 Program
Store::DiskConfig cacheSwap
struct StatCounters::@112 syscalls
struct StatCounters::@112::@116 disk
struct StatCounters::@108 unlink
RefCount< SwapDir > * swapDirs
void commUnsetFdTimeout(int fd)
clear a timeout handler by FD number
int commUnsetNonBlocking(int fd)
#define debugs(SECTION, LEVEL, CONTENT)
void fatal(const char *message)
void fd_note(int fd, const char *s)
void safeunlink(const char *s, int quiet)
pid_t ipcCreate(int type, const char *prog, const char *const args[], const char *name, Ip::Address &local_addr, int *rfd, int *wfd, void **hIpc)
int xselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
POSIX select(2) equivalent.
time_t getCurrentTime() STUB_RETVAL(0) int tvSubUsec(struct timeval
int xread(int fd, void *buf, size_t bufSize)
POSIX read(2) equivalent.
int xwrite(int fd, const void *buf, size_t bufSize)
POSIX write(2) equivalent.
void unlinkdUnlink(const char *path)
#define UNLINKD_QUEUE_LIMIT
const char * xstrerr(int error)
char * xstrncpy(char *dst, const char *src, size_t n)