The Linux Programming Interface
Process Resources 757 Be aware that, in many cases, the shell commands for getting and setting resource limits (ulimit in bash a ...
758 Chapter 36 In this example, the program managed to create only 4 new processes, because 26 processes were already running fo ...
Process Resources 759 if (argc < 2 || argc > 3 || strcmp(argv[1], "--help") == 0) usageErr("%s soft-limit [hard-limit]\n", ...
760 Chapter 36 If all possible resource limit values can be represented in rlim_t, then SUSv3 permits an implementation to defin ...
Process Resources 761 RLIMIT_CPU The RLIMIT_CPU limit specifies the maximum number of seconds of CPU time (in both system and us ...
762 Chapter 36 ID of the calling process. When a POSIX message queue is created using mq_open(), bytes are deducted against this ...
Process Resources 763 There is also a system-wide limit on the total number of files that may be opened by all processes. This l ...
764 Chapter 36 In older Linux 2.4 kernels (up to and including 2.4.29), RLIMIT_RSS did have an effect on the behavior of the mad ...
Process Resources 765 36.4 Summary Processes consume various system resources. The getrusage() system call allows a process to m ...
...
DAEMONS This chapter examines the characteristics of daemon processes and looks at the steps required to turn a process into a d ...
768 Chapter 37 z httpd: the HTTP server daemon (Apache), which serves web pages. z inetd: the Internet superserver daemon (descr ...
Daemons 769 Clear the process umask (Section 15.4.6), to ensure that, when the daemon creates files and directories, they have ...
770 Chapter 37 Listing 37-1: Header file for become_daemon.c ––––––––––––––––––––––––––––––––––––––––––––––––––– daemons/become_ ...
Daemons 771 if (!(flags & BD_NO_UMASK0)) umask(0); /* Clear file mode creation mask */ if (!(flags & BD_NO_CHDIR)) chdir ...
772 Chapter 37 during system shutdown. Those daemons that are not terminated in this fashion will receive a SIGTERM signal, whic ...
Daemons 773 whether hupReceived has been set u; if so, it reopens the log file, rereads the config- uration file, and clears the ...
774 Chapter 37 convention, configuration files are placed in /etc or one of its subdirectories, while log files are often placed ...
Daemons 775 logOpen(LOG_FILE); readConfigFile(CONFIG_FILE); hupReceived = 0; /* Get ready for next SIGHUP */ } if (unslept == 0) ...
776 Chapter 37 The syslog facility has two principal components: the syslogd daemon and the syslog(3) library function. The Syst ...
«
36
37
38
39
40
41
42
43
44
45
»
Free download pdf