This one time, at band camp, KaalH! said: > Stephen Gran a ecrit : > > This one time, at band camp, KaalH! said: > > > you may use "/usr/bin/freshclam --quiet" instead of " > > > /usr/bin/freshclam /dev/null" within cron script. > > > > No, that will miss warning messages. This decision was made on > > purpose. Is there a reason you want it changed? > > yes, > > freshclam jobs sometimes hang after an update (once or twice a day > with hourly run). I'm using runit to run cron ( cron -f -l ). on > another host with the --quiet option, got no hanged freshclam for 2 > days. don't know if it's related, but seems better.
Redirection of output seems hardly likely to hang a process. Does this other host that doesn't hang use runit? You see, what's going on is that there are 4 categories of messages output by freshclam error goes to stderr warning goes to stderr info goes to stdout verbose goes to stdout You only get verbose messages if you run -v Using --quiet suppresses info and warning messages. So the only way to get warning and error is redirect stdout to /dev/null, but retain the stderr stream, and not use --quiet. This is actually fairly standard practice - take a look at logrotate scripts and the like. They frequently contain /etc/init.d/foo reload > /dev/null as a postrotate script. If you are getting ahngs in freshclam, there is either a problem with freshclam itself, or with the envirnment calling it. An investigation in that direction seems in order. The redirection of output itself seems unlikely to cause any harm, unless there is something wierd with your environment. -- ----------------------------------------------------------------- | ,''`. Stephen Gran | | : :' : [EMAIL PROTECTED] | | `. `' Debian user, admin, and developer | | `- http://www.debian.org | -----------------------------------------------------------------
pgpjiB8iylkZS.pgp
Description: PGP signature