O'Reilly logo

GNU/Linux Rapid Embedded Programming by Rodolfo Giometti

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

System daemons

As already stated, a daemon is a computer program that runs as a background process; in particular, for a Unix system, the Unix bible Advanced Programming in the UNIX Environment by Richard Stevens says:

Daemons are processes that live for a long time. They are often started when the system is bootstrapped and terminate only when the system is shutdown. We say they run in background, because they don't have a controlling terminal.

This behavior is so important that a special function has been implemented in the glibc library that permits the developer to easily create a daemon process. The function is (obviously) named daemon().

Just to fix this concept, we report a possible implementation of the daemon() function in order to show ...

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