Want bash '&' to behave like csh '&'

Want bash '&' to behave like csh '&'

Post by Steve Madi » Thu, 07 Jan 1999 04:00:00

Is there some way to make the bourne-ish shells ("bash" in
particular) behave like the csh-ish shells with respect to
how they handle jobs backgrounded with a '&'?  Bourne shells
kill all their backgrounded children when the shell dies,
and C shells leave backgrounded jobs running when the shell
dies.  I already know about nohup, but that's not an elegant
solution for our needs.  I'd like to make it work with just '&'.

(Background for why we want this...)

I've got a group of users who are mildly familiar with Unix (can
use ls, cp, rm, mv, et all, but that's about it.)

They currently use tcsh as their default shell and I want to
switch them to bash because its better for scripting, and I
don't have time anymore to maintain two sets of default login
scripts for all our settings (bourne and csh versions).

Anyway, I have seen that most of the functionality of tcsh they
use is also there in bash, so it should be smooth except that they
tend to background jobs alot with '&' for X11 programs started
from an xterm.