Question - What are the various IDs in UNIX processes?
Answer -
Process ID is a unique integer that UNIX uses to identify each process. The process executes to initiate other processes is called parent process and its ID is defined as PPID (Parent Process ID).
getppid() – Is a command to retrieve PPID
Every process is associated with a specific user and is called the owner of the process. The owner has all the privileges over the process. The owner is also the user who executes the process.
Identification for a user is the User ID. The process is also associated with Effective User ID which determines the access privileges for accessing resources like files.
- getpid() – Retrieve process id
- getuid() – Retrieve user-id
- geteuid() – Retrieve effective user-id