Question 19Asked in DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 1 (9:00 AM)What is typically returned by the getpid system call in Unix-based operating systems?
- AThe process ID of the kernel
- BProcess ID of the current process
- CProcess ID of the first process
- DProcess ID of the parent process
Show answerHide answer
Correct answer: (B) Process ID of the current process
Explanation
getpid() returns the process ID of the calling (current) process. The parent's PID is returned by getppid().