#include "squid.h"
#include "comm/Connection.h"
#include "compat/pipe.h"
#include "compat/socket.h"
#include "compat/unistd.h"
#include "fd.h"
#include "fde.h"
#include "globals.h"
#include "ip/Address.h"
#include "ipc/Kid.h"
#include "rfc1738.h"
#include "SquidConfig.h"
#include "SquidIpc.h"
#include "tools.h"
#include <chrono>
#include <thread>
#include <cstdlib>
Go to the source code of this file.
|
| static int | ipcCloseAllFD (int prfd, int pwfd, int crfd, int cwfd) |
| |
| static void | PutEnvironment () |
| |
| 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) |
| |
◆ HELLO_BUF_SZ
◆ IPC_CHECK_FAIL
| #define IPC_CHECK_FAIL |
( |
|
f, |
|
|
|
d, |
|
|
|
c |
|
) |
| |
Value: if ((f) < 0) { \
debugs(54,
DBG_CRITICAL,
"ERROR: Failed to create helper " d
" FD: " << c); \
} else void(0)
static int ipcCloseAllFD(int prfd, int pwfd, int crfd, int cwfd)
◆ ipcCloseAllFD()
◆ ipcCreate()
| 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 |
|
) |
| |
Definition at line 63 of file ipc.cc.
References assert, comm_close, comm_connect_addr(), Comm::COMM_ERROR, COMM_NOCLOEXEC, comm_open(), comm_open_listener(), comm_udp_recv(), comm_udp_send(), commSetNonBlocking(), commUnsetFdTimeout(), Config, DBG_CRITICAL, DBG_IMPORTANT, debugs, DebugStream(), Debug::Extra(), fd_open(), FD_PIPE, fd_table, Ip::Address::FreeAddr(), hello_buf, hello_string, hIpc, Ip::Address::InitAddr(), IPC_CHECK_FAIL, IPC_FIFO, IPC_NONE, IPC_TCP_SOCKET, IPC_UDP_SOCKET, IPC_UNIX_DGRAM, IPC_UNIX_STREAM, ipcCloseAllFD(), logsFlush(), no_suid(), opt_no_daemon, pid, pkHelper, PutEnvironment(), ResyncDebugLog(), rfc1738_escape, SquidConfig::sleep_after_fork, SQUID_MAXFD, TheProcessKind, xaccept(), xclose(), xgetsockname(), xlisten(), xread(), xsetsockopt(), xstrerr(), and xwrite().
Referenced by DiskdIOStrategy::init(), logfile_mod_daemon_open(), IcmpSquid::Open(), Helper::Client::openSessions(), statefulhelper::openSessions(), and unlinkdInit().
◆ PutEnvironment()
| static void PutEnvironment |
( |
| ) |
|
|
static |
◆ hello_buf
◆ hello_string
| const char* hello_string = "hi there\n" |
|
static |