Feb 10, 2017, 1:21 AM
Post #1 of 5
redirect stderr to stdout hungs
I've a perl script for installation of our product which was working good with no issues. Recently using the script hungs at a point and I could see that following code hungs
If I remove the $redirect from last line program continues to work.
my($cmd,$self) = @_;
my $log = $self->get_logger();
my $status = $NOT_OK;
my $redirect = "2>&1";
$log->info("COMMAND EXECUTED:\n $cmd $redirect");
my $output = `$cmd $redirect`;
I was trying to run linux service using the command.
(This post was edited by FishMonger on Feb 10, 2017, 7:39 AM)