O'Reilly logo

Linux: Embedded Development by Chris Simmonds, Alex González, Alexandru Vaduva

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

Tip

You may also want to start klogd in the same way: klogd sends kernel log messages to syslogd so that they can be logged to permanent storage.

As an aside, I should mention that, in the case ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required