Background writes in csh

Marc Roussel mroussel at alchemy.chem.utoronto.ca
Tue Sep 25 08:51:18 AEST 1990


In article <JBW.90Sep21223022 at bucsf.bu.edu> jbw at bucsf.bu.edu (Joseph Wells) 
writes:
>   In article <1990Sep19.203803.25798 at cs.umn.edu> (Paul Lindner) writes:
>   >I've been having a weird problem for the longest time.  I like to use`
>   >aliases for my ls command:
>   >
>   >   alias ls 'ls -FC \!* |more'
>   >
>   >This works fine, however sometimes it stops both tasks and puts them in 
>   >the background, (this is on various Suns using csh and tcsh).  Typing
>   >fg restarts the listing.  This is really irritating, typing fg and all.
>
>[...] there is a known problem with Sun's csh
>that causes this problem with pipelines in general.  It's a race condition
>during the setup of the pipeline by the csh.  I suspect that less works
>because it has a larger executable file and thus takes slightly longer for
>SunOS to load.

If this is indeed the case, we have a similar (though slightly
different) problem on our Apollo's.  (Processes which start and execute
too fast sometimes terminate before the pipe is open.  This results in
no output when there should have been.)  Anyway, try 

alias ls '(ls -FC \!* | more)'

On our machines, running the whole thing in a subshell slows the process
start up enough to allow the pipe to open in a timely fashion.

                                No guarantees... just a thought.

				Marc R. Roussel
                                mroussel at alchemy.chem.utoronto.ca



More information about the Comp.unix.shell mailing list