Artificial intelligent assistant

When a daemon is re-parented to init (Pid 1) is the original PPID stored anywhere? I am fairly certain the answer is no, but I was wondering if it's possible to decipher the original parent of a daemon process, prior to their daemonization and subsequent re-parenting process.

The answer is operating-system-specific, but at least on Linux, unless the processes involved log the information somewhere, there is no memory of the original parent process.

The Linux kernel does keep track of two parent processes, but that’s for `ptrace`, not to track the original parent process. In any case, when a process exits, its data structures are removed, so there wouldn’t be any information to point to, and keeping the original parent pid would end up being misleading since pids are recycled.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 1b1945bb85bc875c8096cf3338093236