Background writes in csh

Joe Wells jbw at bucsf.bu.edu
Sun Oct 7 16:18:31 AEST 1990


lindner at cs.umn.edu (Paul Lindner) writes:

   gorpong at ping.uucp (Gordon C. Galligher) writes:

   >>   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.

   >More(1) is the problem here.  I have not quite figured it out, but I had a 
   >similar problem when my users would type:  history | more and it would do
   >[.........]

   More(1) isn't the problem here, I tried using less for a while but I still
   got the infamous:

   Stopped (tty output)
   [1] 21298 21299

   So, it must be someplace in the shell.

I finally remembered the problem:  Sun's (and other vendor's) csh is based
on an early BSD csh that depended on the original semantics of vfork.
However, Sun made vfork behave the same as fork, hence it is no longer
certain that the first child the csh forks in a pipeline executes setpgrp
before the csh changes the pgrp of the tty device.

I can't remember if Sun ever fixed this one, but it's been around for
several years.

-- 
Joe Wells <jbw at bu.edu>



More information about the Comp.unix.shell mailing list