Always log command run via execute_command

This commit is contained in:
Jamie Cameron
2010-04-01 13:43:10 -07:00
parent 327faf4d7e
commit a9b45f968e

View File

@@ -7764,6 +7764,7 @@ if (&is_readonly_mode() && !$safe) {
$cmd = &translate_command($cmd);
# Use ` operator where possible
&webmin_debug_log('CMD', "cmd=$cmd") if ($gconfig{'debug_what_cmd'});
if (!$stdin && ref($stdout) && !$stderr) {
$cmd = "($cmd)" if ($gconfig{'os_type'} ne 'windows');
$$stdout = `$cmd 2>$null_file`;
@@ -7778,7 +7779,6 @@ elsif (!$stdin && !$stdout && !$stderr) {
$cmd = "($cmd)" if ($gconfig{'os_type'} ne 'windows');
return system("$cmd >$null_file 2>$null_file <$null_file");
}
&webmin_debug_log('CMD', "cmd=$cmd") if ($gconfig{'debug_what_cmd'});
# Setup pipes
$| = 1; # needed on some systems to flush before forking