diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-11-23 16:28:57 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-11-23 16:28:57 +0200 |
commit | 2d3d121453b19003c6454e7c6b4ed98164e7d531 (patch) | |
tree | 65393ed5a53f2a56b4d6ac6ac327bfb533d8b81d /src/pies.h | |
parent | 8a7cf4b45431bbead62b2ae390f49caedf702fe5 (diff) | |
download | pies-2d3d121453b19003c6454e7c6b4ed98164e7d531.tar.gz pies-2d3d121453b19003c6454e7c6b4ed98164e7d531.tar.bz2 |
Limit number of instances for inetd-style components.
* src/pies.c (component_keywords): New keyword
`max-instances'.
* src/pies.h (struct component): New member:
max_instances.
* src/progman.c (struct prog): Rename count to
failcount. All uses changed.
New members num_instances and listener.
(progman_accept): Keep track of the number of
instances. Deny connection if it is greater than
max_instances (unless the latter is 0).
(progman_cleanup): Keep track of the number of
instances in inetd listeners.
Diffstat (limited to 'src/pies.h')
-rw-r--r-- | src/pies.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -151,6 +151,7 @@ struct component gl_list_t prereq; /* Prerequisites */ gl_list_t depend; /* Dependency targets */ int flags; /* CF_ bitmask */ + size_t max_instances; /* Maximum number of running instances */ char *rmfile; /* Try to remove this file before starting */ struct pies_privs privs; /* UID/GIDS+groups to run under */ mode_t umask; /* Umask to install before starting */ |