MCPcopy Create free account
hub / github.com/acl-dev/acl / master_throttle

Function master_throttle

app/master/daemon/master/master_spawn.cpp:64–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62/* master_throttle - suspend process creation */
63
64static void master_throttle(ACL_MASTER_SERV *serv)
65{
66 const char *myname = "master_throttle";
67
68 /*
69 * Perhaps the command to be run is defective,
70 * perhaps some configuration is wrong, or
71 * perhaps the system is out of resources.
72 * Disable further process creation attempts for a while.
73 */
74 if ((serv->flags & ACL_MASTER_FLAG_THROTTLE) == 0) {
75 serv->flags |= ACL_MASTER_FLAG_THROTTLE;
76 acl_event_request_timer(acl_var_master_global_event,
77 master_unthrottle_wrapper, (void *) serv,
78 (acl_int64) serv->throttle_delay * 1000000, 0);
79 if (acl_msg_verbose) {
80 acl_msg_info("%s(%d)->%s: throttling command %s",
81 __FILE__, __LINE__, myname, serv->path);
82 }
83 }
84}
85
86static void log_argv(const char *procname, ACL_ARGV *args)
87{

Callers 2

acl_master_spawnFunction · 0.85
acl_master_reap_childFunction · 0.85

Calls 2

acl_event_request_timerFunction · 0.85
acl_msg_infoFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…