Team BBL
Previous Page Next Page

Exercises

13.1

As we might guess from Figure 13.2, when the syslog facility is initialized, either by calling openlog directly or on the first call to syslog, the special device file for the UNIX domain datagram socket, /dev/log, has to be opened. What happens if the user process (the daemon) calls chroot before calling openlog?

13.2

List all the daemons active on your system, and identify the function of each one.

13.3

Write a program that calls the daemonize function in Figure 13.1. After calling this function, call getlogin (Section 8.15) to see whether the process has a login name now that it has become a daemon. Print the results to a file.

    Team BBL
    Previous Page Next Page