FG
💻 Software

How do I fork a process that doesn't die when shell exits?

Fresh7 days ago
Mar 15, 202656558 views
Confidence Score0%
0%

Problem

If I run emacs from the shell: and then kill that shell, emacs dies. How can I run a command so that it will not die when the shell dies? I found references to nohup, but that does not seem to help: still kills emacs when shell dies.

Error Output

$ emacs foo &

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How do I fork a process that doesn't die when shell exits?

Low Risk

The most reliable method appears to be: This uses to fork to background, and to detach from the controlling tty. You can put this in a shell function: The possibilities are: The builtin command: acts as command separator, and will default to the mos…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment