I know that the PCB is a data structure which includes parent process id(pPID), process id(PID), pointers, and etc. Is there anyway to find the PID of parent process without using getppid function?
            Asked
            
        
        
            Active
            
        
            Viewed 270 times
        
    0
            
            
        - 
                    Why don't you want to use `getppid()`? What programming language are you using? – John Zwinck Oct 11 '20 at 02:15
 
1 Answers
0
            
            
        The fields of /proc/self/stat (as documented in proc(5)) include PPID. Take care in parsing as comm may contain spaces and other unusual characters.
(But I second @JohnZwinck's comment. Why?)
        ephemient
        
- 198,619
 - 38
 - 280
 - 391
 
- 
                    To find a way to imply 'getppid'-like system call in a new shell which the getppid function is not implemented yet. – Jason.P Oct 11 '20 at 11:42