syslogd & return code

Rob Landley rob at landley.net
Fri Dec 30 23:37:02 UTC 2005


On Tuesday 27 December 2005 04:32, greg wrote:
> #################################################
> static void quit_signal(int sig)
> {
>         logMessage(LOG_SYSLOG | LOG_INFO, "System log daemon exiting.");
>         unlink(lfile);
> #ifdef CONFIG_FEATURE_IPC_SYSLOG
>         ipcsyslog_cleanup();
> #endif
>
>         exit(TRUE);
> }
> #################################################

This is clearly the right thing to do (tru

> This signal handler is connected to SIGINT, SIGTERM & SIGQUIT
>
> Should not we exit with EXIT_SUCCESS code instead of TRUE ??

This is clearly the right thing to do, I'm just suprised that something out 
there cares about the error return code of a daemon.  (Don't most of them 
fork twice to disassociate themselves from the calling process?  An init that 
tries to overcome that and check on an exit code that the process goes out of 
its way to indicate is uninteresting is pretty much broken.)

But yeah, our code is wrong in an entirely abstract academic way, and I'll fix 
it...

Rob
-- 
Steve Ballmer: Innovation!  Inigo Montoya: You keep using that word.
I do not think it means what you think it means.



More information about the busybox mailing list