Remove console messages of background programs

Hi all !
If I run Xterm in backgprund mode &, when it stops I get this annoying messages on console:

[1] Exit 15 xterm ...
[2] Exit 15 xterm ...

How do can I remove this kind of ?

Thanks !

You should run things like this with nohup, which ensures the parent does not kill the child if it dies/is killed, and redirects all output to the nohup.out file.

I had a problem with my wm getting killed by ctrl-c int on my xterm, the parent. One solution was to kill the parent and let the nohup wm keep running.

The wm, xterm and any x apps will die if the x server is not connected. I use a local Xvnc x service so if I disconnect, all my x is still running on that host. I do this for every host. Keystrokes and clicks are precious, so do not waste.

For bash and zsh this works:

(xterm &>/dev/null &)

Yes, a subshell makes the background job the child of a dead process, so you do not gt the job messages, but it is still killed with the grandparent by SIGHUP.

The subshell is great for wait, as it waits only for bg jobs inside subshell, not those of your interactive shell spawned long ago.