output

Joshua Judson Rosen jrosen at harvestai.com
Thu Jan 7 20:40:26 UTC 2016


On 2016-01-07 14:43, David Henderson wrote:
> As a follow-up, when I call crond with the -L parameter the output is
> redirected to the log file.  It looks like the default settings (going
> to syslog) output to stdout no matter what.

Hi David,

It's actually not going to stdout, it's going to syslog; and because you
don't have a syslogd running and crond uses the LOG_CONS option
(or because you do have a syslogd running but have it configured
to write directly to the console instead of writing to a logfile),
the messages are being written directly to the console
(presumably via /dev/console, unless your system works differently).

If it was writing to stdout, you'd be able to suppress it by
redirecting stdout. ;)

crond normally doesn't write anything to stdout or stderr--
in fact, unless you invoke it as "crond -f", one of the first things
that crond does is to close stdin, stdout, and stderr so that
it _can't_ use them.

You probably want to run syslogd (and ensure that it's started
before other processes that log to it like crond);
busybox's syslogd will default to writing all of these messages
into /var/log/messages, but you can configure it to do otherwise
if you want.


> On 1/7/16, David Henderson <dhenderson at digital-pipe.com> wrote:
>> Good afternoon busyboxers!  I have been working with this software on
>> one of my own projects and during the boot cycle I'm calling the crond
>> applet to start.  As a means of keeping the output clean for the user,
>> I've tried calling the binary as so:
>>
>> /usr/sbin/crond >/dev/null 2>/dev/null
>>
>> but no matter what, I get the following output:
>>
>> crond[140]: crond (busybox 1.23.1) started, log level 8
>>
>> How or why does busybox output in a way that can't be redirected?
>>
>> Thanks,
>> Dave
>>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
> 


-- 
"Don't be afraid to ask (λf.((λx.xx) (λr.f(rr))))."


More information about the busybox mailing list