Skip to content
Snippets Groups Projects
Commit 5ead416c authored by Laurent THOMAS's avatar Laurent THOMAS
Browse files

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

parent 723e272e
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment