Guantanamo: use sh to parse command
This commit is contained in:
parent
5fe1d4c80d
commit
a0f9002efd
1 changed files with 12 additions and 4 deletions
|
@ -53,10 +53,18 @@ sub node_launch
|
||||||
$command->appendText($c->{nodeValue});
|
$command->appendText($c->{nodeValue});
|
||||||
$cmd->appendChild($command);
|
$cmd->appendChild($command);
|
||||||
|
|
||||||
my($wtr, $rdr, $stderr);
|
my($wtr, $rdr, $rv);
|
||||||
my $pid = open3($wtr, $rdr, $stderr, $c->{nodeValue});
|
my $stderr = "";
|
||||||
|
eval {
|
||||||
|
my $pid = open3($wtr, $rdr, $stderr, "sh", "-c", $c->{nodeValue});
|
||||||
waitpid( $pid, 0 );
|
waitpid( $pid, 0 );
|
||||||
my $rv = $? >> 8;
|
$rv = $? >> 8;
|
||||||
|
};
|
||||||
|
if ($@)
|
||||||
|
{
|
||||||
|
$stderr = $@ . $stderr;
|
||||||
|
$rv = -1;
|
||||||
|
}
|
||||||
|
|
||||||
my $out = $doc->createElement("out");
|
my $out = $doc->createElement("out");
|
||||||
my $str = "";
|
my $str = "";
|
||||||
|
|
Reference in a new issue