You do not mention if this is running as an X app or a console app.
If it's as a console app, of course it needs to close. You got rid of it's input/output, more technically the (pseudo) tty it was on. It's very unlikely this is what you meant, so let's assume you're talking about an X app.
nohup should work, not sure why it isn't. When the shell closes, it sends SIGHUP to all processes in its process group. nohup tells the command to ignore SIGHUP.
You can also try setsid, which disconnects the process from the process group
alias emacs='setsid emacs'
Or add disown after &
(exec emacs)work? – Hello71 Apr 27 '11 at 20:51(emacs). If the subshell is given a single command, theexecis implied, at least in case ofbash. Same applies tobash -c 'foo'versusbash -c 'exec foo'. (However, note that emacs itself may be detaching from the terminal; gvim, for example, does this. It is better to test with a program with known behavior.) – u1686_grawity Apr 27 '11 at 21:41&>/dev/nullto get rid of the outpur in the console too? I tried nad it seems to mess up with the process. – sup Sep 11 '22 at 02:47