Kids.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#ifndef SQUID_IPC_KIDS_H
10#define SQUID_IPC_KIDS_H
11
12#include "ipc/Kid.h"
13
14#include <vector>
15
17class Kids
18{
19public:
20 Kids ();
21
22private:
23 Kids (const Kids&);
24 Kids& operator= (const Kids&);
25
26public:
28 void init();
29
31 Kid* find(pid_t pid);
32
34 Kid& get(size_t i);
35
37 bool allHopeless() const;
38
40 void forgetAllFailures();
41
44 time_t forgetOldFailures();
45
47 bool allExitedHappy() const;
48
50 bool someSignaled(const int sgnl) const;
51
53 bool someRunning() const;
54
56 bool shouldRestartSome() const;
57
59 size_t count() const;
60
61private:
62 std::vector<Kid> storage;
63};
64
65extern Kids TheKids;
66
67extern SBuf TheKidName;
68
69#endif /* SQUID_IPC_KIDS_H */
70
static pid_t pid
Definition: IcmpSquid.cc:34
SBuf TheKidName
current Squid process name (e.g., "squid-coord")
Definition: Kids.cc:19
Kids TheKids
All kids being maintained.
Definition: Kids.cc:18
Definition: Kid.h:18
a collection of kids
Definition: Kids.h:18
Kids & operator=(const Kids &)
not implemented
void forgetAllFailures()
forgets all failures in all kids
Definition: Kids.cc:77
bool someSignaled(const int sgnl) const
whether some kids died from a given signal
Definition: Kids.cc:116
size_t count() const
returns the number of kids
Definition: Kids.cc:146
Kids(const Kids &)
not implemented
bool allExitedHappy() const
whether all kids called exited happy
Definition: Kids.cc:106
Kid * find(pid_t pid)
returns kid by pid
Definition: Kids.cc:47
bool shouldRestartSome() const
whether some kids should be restarted by master
Definition: Kids.cc:136
std::vector< Kid > storage
Definition: Kids.h:62
void init()
initialize all kid records based on Config
Definition: Kids.cc:26
bool someRunning() const
whether some kids are running
Definition: Kids.cc:126
Kid & get(size_t i)
returns the kid by index, useful for kids iteration
Definition: Kids.cc:60
time_t forgetOldFailures()
Definition: Kids.cc:84
Kids()
Definition: Kids.cc:21
bool allHopeless() const
whether all kids are hopeless
Definition: Kids.cc:67
Definition: SBuf.h:94

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors