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.
This commit is contained in:
Eelco Dolstra 2017-03-13 15:11:13 +01:00
parent d1afb42f12
commit 242ea8009f
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
2 changed files with 3 additions and 3 deletions

View file

@ -27,8 +27,6 @@ struct Evaluator
typedef std::map<JobsetName, Jobset> 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());
});

View file

@ -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 `<project>:<jobset>:<job>