T, csh bugs

Kartik Subbarao subbarao at phoenix.Princeton.EDU
Wed Oct 24 07:46:50 AEST 1990


This was going to be a reply to an earlier article saying that you couldn't have multiline
aliases. My response was going to be sure you can, if you \ a ^J. For example, what I was
trying to do was:

tcsh % alias foo 'foreach i (*) \^J echo $i \^J end'

The command works fine if not "aliased" -- that is, if I just type

tcsh % foreach i (*) \^J echo $i \^J end 

on one line, tcsh will nicely do the foreach loop for me. If, however, I put it into an alias,
tcsh decides to log me out.

If I do this aliasing in csh, csh simply will segmentation fault. Why is this the case?

Also, this bug reminded me of some earlier bugs which I had discovered with csh and tcsh.

Bug 1:

Have you ever tried typing:

tcsh % ``

Notice it will tell you "Segmentation Fault" in tcsh - but this is not the segmentation fault of
tcsh -- it's that of the child process that tcsh forks due to this.


Bug 2:

I also wanted to alias "which" as follows:

% alias which "/bin/file `/usr/ucb/which \!*`"

But did csh or tcsh let me? Of course not. csh decided to Abort and dump 8 megs of core, and
tcsh simply decided to fork tons of processes to fill up my process table when the command
as not &'ed. If I did '&' it, it would simply hang.


And that's where it stands. But I'll tell you something though. I'll never convert to sh** or
something like that.

Oh and by the way, bug fixes are appreciated anyone !


				-Kartik









(I need a new .signature -- any suggestions?)
subbarao@{phoenix or gauguin}.Princeton.EDU -|Internet
kartik at silvertone.Princeton.EDU (NeXT mail)       -|	
SUBBARAO at PUCC.BITNET			          - Bitnet



More information about the Comp.unix.shell mailing list