# Can I make "There are stopped jobs" harder to kill?

Typical circumstance:

I momentarily require to access a documents that my vhost stops me from accessing. I discharge up strength, modify the setups and also history strength to inform apache to refill its arrangement.

Trouble:

If I currently forget this, my shell will certainly inform me "There are quit jobs", when I CTRL+D the session. Nonetheless, given that I have a behavior of having coverings in coverings in coverings, as a result of ssh, tmux and also comparable, I additionally regularly repetitively send EOF when I cover my develop and also close my windows. This subsequently creates me to mistakenly eliminate the shell, regardless of the caution.

Can I make it tougher to eliminate such coverings?

9
2022-06-07 14:40:37
Source Share

If you are making use of bash, you can set the IGNOREEOF shell variable to a number that defines the amount of successive EOF chars the shell needs to overlook prior to dealing with the EOF as an exit signal. Examine the male web page for specifics.

Nonetheless, that causes prior to the "there are quit jobs" message causes, so you still have the very same trouble - you get that message, and also another ^ D leaves the shell.

A choice is to place the variety of shell work right into your punctual if that number is more than absolutely no.

As an example, a passage from my.bashrc:

PROMPT_COMMAND=prompt_command
prompt_command() {
job_count=$(jobs | wc -l) if [$job_count -gt 0 ] ; then
prompt_job="[$job_count] " else prompt_job="" fi } PS1="...\${prompt_job}..."


After this the shell might resemble ...[1] ...

That places a work matter in your punctual if it is more than absolutely no. This makes it very easy to see when you have insufficient work and also functions well (for me) as an aesthetic suggestion that work are still running.

10
2022-06-07 15:10:07
Source