From: janw Date: Thu, 27 Aug 2009 09:33:22 +0000 (+0000) Subject: Save exit_value from subshell correct with newer perl versions. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=581f441b0d46e2852af5ca716ec3f9c906aa04da;p=gosa.git Save exit_value from subshell correct with newer perl versions. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14150 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/modules/GosaSupportDaemon.pm b/gosa-si/modules/GosaSupportDaemon.pm index 566ba0e57..b3a431677 100644 --- a/gosa-si/modules/GosaSupportDaemon.pm +++ b/gosa-si/modules/GosaSupportDaemon.pm @@ -758,9 +758,11 @@ sub run_as { } my $cmd_line= "$sudo_cmd su - $uid -c '$command'"; open(PIPE, "$cmd_line |"); - my $result = {'resultCode' => $?}; - $result->{'command'} = $cmd_line; + my $result = {'command' => $cmd_line}; push @{$result->{'output'}}, ; + close(PIPE); + my $exit_value = $? >> 8; + $result->{'resultCode'} = $exit_value; return $result; }