From 242ea8009fecbe408339b2f0752a4890d8a99f99 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 13 Mar 2017 15:11:13 +0100 Subject: [PATCH] hydra-evaluator: Don't use the "timeout" command "timeout" does not propagate PR_SET_PDEATHSIG, so it prevents hydra-eval-jobset from being killed when hydra-evaluator quits. --- src/hydra-evaluator/hydra-evaluator.cc | 4 +--- src/script/hydra-eval-jobset | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hydra-evaluator/hydra-evaluator.cc b/src/hydra-evaluator/hydra-evaluator.cc index 5fa660fb..7184f365 100644 --- a/src/hydra-evaluator/hydra-evaluator.cc +++ b/src/hydra-evaluator/hydra-evaluator.cc @@ -27,8 +27,6 @@ struct Evaluator typedef std::map Jobsets; - int evalTimeout = 3600; - size_t maxEvals = 4; struct State @@ -87,7 +85,7 @@ struct Evaluator assert(jobset.pid == -1); jobset.pid = startProcess([&]() { - Strings args = { "timeout", "-s", "KILL", std::to_string(evalTimeout), "hydra-eval-jobset", jobset.name.first, jobset.name.second }; + Strings args = { "hydra-eval-jobset", jobset.name.first, jobset.name.second }; execvp(args.front().c_str(), stringsToCharPtrs(args).data()); throw SysError(format("executing ‘%1%’") % args.front()); }); diff --git a/src/script/hydra-eval-jobset b/src/script/hydra-eval-jobset index 29c1f649..469e75c6 100755 --- a/src/script/hydra-eval-jobset +++ b/src/script/hydra-eval-jobset @@ -31,6 +31,8 @@ my $plugins = [Hydra::Plugin->instantiate(db => $db, config => $config)]; my $dryRun = defined $ENV{'HYDRA_DRY_RUN'}; +alarm 3600; # FIXME: make configurable + sub parseJobName { # Parse a job specification of the form `::