Sample Header Ad - 728x90

In zsh, how can I more quickly disown the foreground process?

11 votes
3 answers
6129 views
My method for disowning the foreground process takes too much effort. Suppose I have a process in zsh's foreground. I want to disown it, so I can close the shell without the process being sent a SIGHUP. At the moment, I start with Ctrl+z to background and pause the process, then $ disown disown: warning: job is suspended, use `kill -CONT -32240' to resume $ kill -CONT -32240 $ —*then* I can close the terminal. How can I automate that? Ideally, I'd like to be able to press Ctrl+j or something to immediately disown the running process. Or second best, I'd want to be able to run a single command to both disown and SIGCONT the process once it's suspended.
Asked by Anko (4666 rep)
Aug 15, 2015, 09:25 PM
Last activity: Sep 2, 2024, 12:33 PM