![]() |
VOOZH | about |
pid_t getppid(void);Return type: getppid() returns the process ID of the parent of the current process. It never throws any error therefore is always successful. Output(Will be different on different systems):
Parent Process id of current process : 3849 Child Process with parent id : 3851NOTE: At some instance of time, it is not necessary that child process will execute first or parent process will be first allotted CPU, any process may get CPU assigned, at some quantum time. Moreover process id may differ during different executions.
pid_t getpid(void);Return type: getpid() returns the process ID of the current process. It never throws any error therefore is always successful. Output (Will be different on different systems):
Current process id of Process : 4195