replace all system() shell invocation with safer non-shell alternative
This commit is contained in:
@@ -50,7 +50,7 @@ my $pid;
|
||||
if (!defined($pid = fork())) {
|
||||
die "Cannot fork(): $!";
|
||||
} elsif ($pid == 0) {
|
||||
exec("python3 $ctx{jobsdir}/server.py $filename");
|
||||
exec("python3", "$ctx{jobsdir}/server.py", $filename);
|
||||
} else {
|
||||
my $newbuild = $db->resultset('Builds')->find($build->id);
|
||||
is($newbuild->finished, 1, "Build should be finished.");
|
||||
|
@@ -19,11 +19,11 @@ my $jobsetinput;
|
||||
|
||||
$jobsetinput = $jobset->jobsetinputs->create({name => "jobs", type => "path"});
|
||||
$jobsetinput->jobsetinputalts->create({altnr => 0, value => getcwd . "/jobs"});
|
||||
system("hydra-eval-jobset " . $jobset->project->name . " " . $jobset->name);
|
||||
system("hydra-eval-jobset", $jobset->project->name, $jobset->name);
|
||||
|
||||
my $successful_hash;
|
||||
foreach my $build ($jobset->builds->search({finished => 0})) {
|
||||
system("hydra-build " . $build->id);
|
||||
system("hydra-build", $build->id);
|
||||
my @outputs = $build->buildoutputs->all;
|
||||
my $hash = substr basename($outputs[0]->path), 0, 32;
|
||||
if ($build->job->name eq "job") {
|
||||
|
Reference in New Issue
Block a user