# Accidentally closed xterm and the processes are still running



## sossego (Feb 18, 2013)

I only know of watch but it does not cover processes, only ttys.


----------



## cpm@ (Feb 26, 2013)

The xterm(1) gets a signal, and the system hopes that it dies. But it may not die, and the process may stay around. Instead of trusting the window manager to kill a window and the process in it, use ps so to know for sure that all the processes are gone. 

E.g. watch out in case you are using zsh(1) or ksh(1), them have options named bg_nice and bgnice, respectively, which run background commands at lower priority. You probably don't want your new windows to run at low priority, be sure that option isn't set.

If you use zsh add in your ~/.zshrc this line:

```
setopt NO_BG_NICE
```


----------

