From 581f441b0d46e2852af5ca716ec3f9c906aa04da Mon Sep 17 00:00:00 2001 From: janw Date: Thu, 27 Aug 2009 09:33:22 +0000 Subject: [PATCH] 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 --- gosa-si/modules/GosaSupportDaemon.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; } -- 2.30.2