projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2721c9
)
Suppress stderr warnings from cron jobs
author
Jamie Cameron
<jcameron@webmin.com>
Sun, 31 Jul 2011 18:11:08 +0000
(11:11 -0700)
committer
Jamie Cameron
<jcameron@webmin.com>
Sun, 31 Jul 2011 18:11:08 +0000
(11:11 -0700)
web-lib-funcs.pl
patch
|
blob
|
history
diff --git
a/web-lib-funcs.pl
b/web-lib-funcs.pl
index
420826a
..
7596cbd
100755
(executable)
--- a/
web-lib-funcs.pl
+++ b/
web-lib-funcs.pl
@@
-4146,6
+4146,11
@@
if (!$main::webmin_script_type) {
}
}
+# If this is a cron job, suppress STDERR warnings
+if ($main::webmin_script_type eq 'cron') {
+ $SIG{__WARN__} = sub { };
+ }
+
# If debugging is enabled, open the debug log
if ($gconfig{'debug_enabled'} && !$main::opened_debug_log++) {
my $dlog = $gconfig{'debug_file'} || $main::default_debug_log_file;