Starting a daemon process

Typically, you would want to run certain background processes at start up. Let's take the log daemon, syslogd, as an example. The purpose of syslogd is to accumulate log messages from other programs, mostly other daemons. Naturally, BusyBox has an applet for that!

Starting the daemon is as simple as adding a line like this to etc/inittab:

::respawn:syslogd -n

respawn means that, if the program terminates, it will be automatically restarted; -n means that it should run as a foreground process. The log is written to /var/log/messages.