Abstract


Something simpler

If you just want to run a task in the background after the user logs out, you can just run nohup <command> &, the standard output and standard error streams are redirected to a file named nohup.out in the current directory by default. But this doesn’t restart the service on failure or after a reboot etc.

Orphan Process


  • A Child Process becomes an orphan if its parent process terminates before it completes, and it is typically adopted by the Init System which immediately calls wait() on the child process to prevent it from becoming a zombie

Important

If an orphan process exits and its adopted parent hasn’t reaped it yet, it can simultaneously be both an orphan and a zombie.