[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: output
From:       David Henderson <dhenderson () digital-pipe ! com>
Date:       2016-01-07 21:32:10
Message-ID: CAF-YAQx9DYP7tNrfGTB5L3TfuPw5faFT4_BLf+bpQmLkWkd5Yg () mail ! gmail ! com
[Download RAW message or body]

>> 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@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


Thanks for the prompt response Joshua!  You are correct that the
syslog daemon was not being started, which would follow your
explanation.  I'll keep this info handy for future reference!

Thanks,
Dave
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic