Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!mit-eddie!uw-beaver!sumax!amc-gw!pilchuck!dataio!peterson From: peterson@Data-IO.COM (Joe Peterson) Newsgroups: comp.unix.questions Subject: UNIX process id trace Keywords: unix pid Message-ID: <2738@dataio.Data-IO.COM> Date: 9 Oct 90 23:59:47 GMT Organization: Data I/O Corporation; Redmond, WA Lines: 29 I have a simple question: Is there a way to get the parent process id of any arbitrary process id? I know of getpid() and getppid(), but those only operate on the current process. I want to build a pid trace for the current process such as long pidtrace[REALLYBIG]; long pid; int i; i=0; pid = getpid(); while(pid != BOOTPROCESS) { pidtrace[i] = pid; ++i; pid = parentpid(pid); } where parentpid() is the magic function that I can't find. Any ideas? Joe Peterson peterson@Data-IO.COM