proc getppid(): int {....raises: [], tags: [], forbids: [].}
Returns the parent's process id. If the parent process has already exited, Windows machines will still return its id; others systems will return the id of the 'init' process (1).
Source
Edit