Write a C program that prints the following identifiers PID,PPID,SID,PGID,UID,EUID.
然后,作业继续询问
What represents each identifier?
我已完成该程序,但尚未找到有关标识符的充分解释.
>他们真正代表什么?
>特别是SID和PGID标识符的用途是什么?
解决方法
> PID – 进程ID
> PPID – 父进程ID
> SID – 会话ID
> PGID – 流程组ID
> UID – 用户ID
> EUID – Effective User ID
看看this SO Post和第一个答案,以便对它们的用途进行健康的解释.
3.270父进程ID
An attribute of a new process identifying the parent of the process. The parent process ID of a process is the process ID of its creator,for the lifetime of the creator. After the creator’s lifetime has ended,the parent process ID is the process ID of an implementation-defined system process.
3.343会议
A collection of process groups established for job control purposes. Each process group is a member of a session. A process is considered to be a member of the session of which its process group is a member. A newly created process joins the session of its creator. A process can alter its session membership; see setsid(). There can be multiple process groups in the same session.
3.296过程组
A collection of processes that permits the signaling of related processes. Each process in the system is a member of a process group that is identified by a process group ID. A newly created process joins the process group of its creator.
3.297进程组ID
The unique positive integer identifier representing a process group during its lifetime.
3.142有效用户ID
An attribute of a process that is used in determining varIoUs permissions,including file access permissions; see also User ID.