<Poprzedni | Spis treści | Następne>
Daemons are server processes that run continuously. Most of the time, they are initialized at system startup and then wait in the background until their service is required. A typical example is the networking daemon, ksinetd, which is started in almost every boot procedure. After the system is booted, the network daemon just sits and waits until a client program, such as an FTP client, needs to connect.
4.1.3. Atrybuty procesu
A process has a series of characteristics, which can be viewed with the ps polecenie:
• The process ID or PID: a unique identification number used to refer to the process.
• The parent process ID or PPID: the number of the process (PID) that started this process.
• Nice number: the degree of friendliness of this process toward other processes (not to be confused with process priority, which is calculated based on this nice number and recent CPU usage of the process).
• Terminal or TTY: terminal to which the process is connected.
• User name of the real and effective user (RUID and EUID): the owner of the process. The real owner is the user issuing the command, the effective user is the one determining access to system resources. RUID and EUID are usually the same, and the process has the same access rights the issuing user would have. An example to clarify this: the browser mozilla in / usr / bin is owned by user korzeń:
theo:~> ls -l /usr/bin/mozilla
-rwxr-xr-x 1 root root 4996 Nov 20 18:28 /usr/bin/mozilla*
theo:~> mozilla &
[1] 26595
theo:~> ps -af
theo:~> ls -l /usr/bin/mozilla
-rwxr-xr-x 1 root root 4996 Nov 20 18:28 /usr/bin/mozilla*
theo:~> mozilla &
[1] 26595
theo:~> ps -af
NIP (VAT)
theo theo
PID PPID C STIME TTY
NIP (VAT)
theo theo
CZAS CMD
CZAS CMD
26601 26599 0 15:04 pts/5 00:00:00 /usr/lib/mozilla/mozilla-bin
26613 26569 0 15:04 pts/5 00:00:00 ps -af
26601 26599 0 15:04 pts/5 00:00:00 /usr/lib/mozilla/mozilla-bin
26613 26569 0 15:04 pts/5 00:00:00 ps -af
Kiedy użytkownik theo starts this program, the process itself and all processes started by the initial process, will be owned by user theo and not by the system administrator. When mozilla needs access to certain files, that access will be determined by theo's permissions and not by korzeń"S.
• Real and effective group owner (RGID and EGID): The real group owner of a process is the primary group of the user who started the process. The effective group owner is usually the same, except when SGID access mode has been applied to a file.