Bug 139148 - stderr output not sent to /dev/null
stderr output not sent to /dev/null
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: webalizer (Show other bugs)
2
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Joe Orton
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-13 01:33 EST by Jeff Thompson
Modified: 2008-05-01 11:38 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-06-21 11:44:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jeff Thompson 2004-11-13 01:33:05 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5)
Gecko/20041107 Firefox/1.0

Description of problem:
Hi, /etc/cron.daily/00webalizer attempts to redirect stdout and stderr
output to /dev/null, however, I still get email from cron jobs when
webalizer encounters errors.

Changing 00webalizer to redirect stderr *after* the redirection of
stdout seems to work. The diff below seems to correct the problem:

--- 00webalizer.old     2004-11-13 00:32:17.913876850 -0600
+++ 00webalizer 2004-11-13 00:19:09.246975466 -0600
@@ -2,7 +2,7 @@
 # update access statistics for the web site

 if [ -s /var/log/httpd/access_log ] ; then
-    /usr/bin/webalizer 2>&1 > /dev/null
+    /usr/bin/webalizer > /dev/null 2>&1
 fi

 exit 0

Let me know if you have any questions. 

Thanks,

Jeff



Version-Release number of selected component (if applicable):
webalizer-2.01_10-22

How reproducible:
Sometimes

Steps to Reproduce:
1. /etc/cron.daily/00webalizer runs via cron
2.
3.


Actual Results:  Email is sent by cron if webalizer encounters
over-size log records and writes warning messages to stderr.

Expected Results:  00webalizer attempts to redirect stdout & stderr to
/dev/null, which should prevent any output from the cron job.

By changing the order of the redirection as shown in the diff, both
stdout and stderr are sent to /dev/null and cron does not send email.

Additional info:
Comment 1 Matthew Miller 2005-04-26 12:23:29 EDT
Fedora Core 2 is now maintained by the Fedora Legacy project for
security updates only. If this problem is a security issue, please
reopen and reassign to the Fedora Legacy product. If it is not a
security issue and hasn't been resolved in the current FC3 updates or
in the FC4 test release, reopen and change the version to match.
Comment 2 Joe Orton 2005-06-21 11:44:29 EDT
[This is a mass bug update]

Fedora Core 2 is now maintained by the Fedora Legacy project for
security updates only. If this problem is a security issue, please
reopen and reassign to the Fedora Legacy product. If it is not a
security issue and hasn't been resolved in the current FC3 or FC4 updates,
reopen and change the version to match.

Note You need to log in before you can comment on or make changes to this bug.