Csh aliases and process control

Ron Natalie <ron> ron at brl-tgr.ARPA
Mon Nov 12 09:33:11 AEST 1984


> 
> 
> 	In my .cshrc I had several three command aliases of the
> 	form  alias foo 'x ; y ; z'.
> 
> 	If I stopped process y, process z was never initiated, a 
> 	different form of the sequence bug noted in csh.1,
> 	where stopping y causes z to be immediately executed
> 	(The manual example was for terminal input sequences).
> 
This behaviour is understandable.  Alias generates the command
x; y; z as if you typed it.  You will note the same behavior if
you type that and stop y.  The stop signal causes the shell to
handle the input line the same as if you had typed an interrupt
at that point.  Brakceting the command causes the bracketed command
to fork and be stopped as a whole, and then restartable as a whole.

Yes this is contrary to the manual.  My Bourne shell with job control
behaves the same way.  It seems to be the only sane way of handling
things.  Trying to restart lists of functions or loops without the
intervening fork of another copy of the shell is too difficult to
consider.

-Ron



More information about the Comp.bugs.4bsd.ucb-fixes mailing list