70 "Squid Parent: %s process %d exited with status %d",
74 "Squid Parent: %s process %d exited due to signal %d with status %d",
77 syslog(LOG_NOTICE,
"Squid Parent: %s process %d exited",
82 syslog(LOG_NOTICE,
"Squid Parent: %s process %d will not be restarted for %ld "
83 "seconds due to repeated, frequent failures",
129 return WEXITSTATUS(
status);
int TheProcessKind
ProcessKind for the current process.
@ pkOther
we do not know or do not care
time_t deathDuration() const
bool calledExit() const
returns true if the process terminated normally
int exitStatus() const
returns the exit status of the process
void start(pid_t cpid)
called when this kid got started, records PID
pid_t pid
current (for a running kid) or last (for stopped kid) PID
bool running() const
returns true if tracking of kid is stopped
SBuf processName() const
returns kid name
time_t stopTime
last termination time
bool hopeless() const
whether the failures are "repeated and frequent"
void stop(PidStatus const exitStatus)
called when kid terminates, sets exiting status
bool isRunning
whether the kid is assumed to be alive
time_t startTime
last start time
bool signaled() const
returns true if the kid was terminated by a signal
int badFailures
number of "repeated frequent" failures
bool exitedHappy() const
whether the process exited with code 0
pid_t getPid() const
returns current pid for a running kid and last pid for a stopped kid
int termSignal() const
returns the number of the signal that caused the kid to terminate
bool shouldRestart() const
returns true if master should restart this kid
PidStatus status
exit status of a stopped kid
void reportStopped() const
describes a recently stopped kid
SBuf & appendf(const char *fmt,...) PRINTF_FORMAT_ARG2
SBuf & append(const SBuf &S)
time_t hopelessKidRevivalDelay
hopeless_kid_revival_delay