Score:0

how to ensure background process nohup by default

nl flag
Leo

I usually uses ctrl+z with bg to set process to background.

I had a glance that in certain circumstances the background processes will be terminated when the terminal be closed. Some variable can be set to ensure the running background process will not be ceased.

Can anyone remind me of that?

ps. I do understand that disown before closing terminal can do the trick, but its not what I'm looking for.

vanadium avatar
cn flag
The background processes launched as a subshell in your current shell *by design* will be closed when you close the parent shell. Preceding a command with `nohup` will change that behavior. A running proces can be changed with `disown`. There may be ways to change the behavior of the Ctrl+Z key, but then your terminal setup will become non standard.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.