In the nim posix module there is a proc, getppid however I can't seem to find an implementation of it for Windows.