Commit 5ead416c authored by Laurent THOMAS's avatar Laurent THOMAS

remove volonatry process maximum life time of 600sec (episys?)

parent 723e272e
......@@ -143,21 +143,6 @@ void *memcpy1(void *dst,const void *src,size_t n) {
void set_priority(int priority)
{
/* When running with a realtime scheduler, a buggy run-away process can take
down the host requiring a reboot to recover. To avoid this scenario, we
use alarm(2) to set a maximum running time */
unsigned max_runtime_seconds = 10 * 60; /* default */
const char *env = getenv("MAX_RUNTIME_SECONDS");
if (env != NULL)
{
max_runtime_seconds = atoi(env);
}
unsigned was_alarm = alarm(max_runtime_seconds);
/* Normally, was_alarm should be 0 indicating there was no previous alarm set.
A non-zero value could indicate a mistake */
fprintf(stderr, "Set alarm for %u seconds, was %u (see $MAX_RUNTIME_SECONDS)\n",
max_runtime_seconds, was_alarm);
struct sched_param param =
{
.sched_priority = priority,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment