path: root/src/pies.h
diff options
authorSergey Poznyakoff <gray@gnu.org.ua>2009-11-23 16:28:57 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-11-23 16:28:57 +0200
commit2d3d121453b19003c6454e7c6b4ed98164e7d531 (patch)
tree65393ed5a53f2a56b4d6ac6ac327bfb533d8b81d /src/pies.h
parent8a7cf4b45431bbead62b2ae390f49caedf702fe5 (diff)
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')
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pies.h b/src/pies.h
index 3917e48..02211a2 100644
--- a/src/pies.h
+++ b/src/pies.h
@@ -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 */

Return to:

Send suggestions and report system problems to the System administrator.