[OCF] ocf-shellfuncs standardization - Comments? Objections?
Nick Stoughton
nick at usenix.org
Tue Aug 16 10:47:38 MDT 2005
On Mon, 2005-08-15 at 21:13, Alan Robertson wrote:
> Our code doesn't print it to standard output. You don't want daemons
> printing to standard output - that's an error. It may cause them to
> crash later on - when the pipe reading from its standard output is closed.
>
> Daemons should NEVER write to standard output.
>
I didn't say that *daemons* should write to standard output ... these
are tools to use in a shell script. Almost all utilities write to
standard output. I remain convinced that the log_xxx_message functions
should write to standard output. This means that you, as a writer of the
shell init script, know that you can do normal redirection things with
this function. For example
log_success_message "All started OK" > /dev/null
or
logger $(log_failure_message "Failed to start service")
The script *starts* the daemon ... it isn't the daemon itself. Even if
it was, it still helps programmers who will now know that they have to
do something with this output (even if it is to discard it). Simply
saying it "prints" it is so ambiguous and vague as to be useless.
--
Nick Stoughton USENIX/FSG Standards Liaison
nick at usenix.org (510) 388 1413
More information about the OCF
mailing list