diff options
author | Andrew Dolgov <[email protected]> | 2017-05-06 10:54:14 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-05-06 10:54:14 +0300 |
commit | 4fd0790804191dac3247430cc3bd7053ae7d32ca (patch) | |
tree | 623a584dc90470c47231ab5ec99ca3582407c855 /update_daemon2.php | |
parent | e6c886bf66928d4bd496672f12b79b547747677b (diff) |
fix DAEMON_SLEEP_INTERVAL not being defined when used
enforce minimum 60 sec spawn/sleep interval in update processes
Diffstat (limited to 'update_daemon2.php')
-rwxr-xr-x | update_daemon2.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/update_daemon2.php b/update_daemon2.php index 1e6edb337..af29ac18f 100755 --- a/update_daemon2.php +++ b/update_daemon2.php @@ -166,6 +166,10 @@ $spawn_interval = SPAWN_INTERVAL; } + // let's enforce a minimum spawn interval as to not forkbomb the host + $spawn_interval = max(60, $spawn_interval); + _debug("Spawn interval: $spawn_interval sec"); + if (isset($options["log"])) { _debug("Logging to " . $options["log"]); define('LOGFILE', $options["log"]); |