Path: utzoo!attcan!uunet!samsung!usc!elroy.jpl.nasa.gov!ames!haven!ncifcrf!nlm-mcs!adm!news From: bzs@cs.bu.edu (Barry Shein) Newsgroups: comp.unix.wizards Subject: csh / bsd job control Message-ID: <22821@adm.BRL.MIL> Date: 21 Mar 90 14:58:51 GMT Sender: news@adm.BRL.MIL Lines: 32 >One bit drudgery in the bsd world whenever writing programs >(or porting programs to bsd) which manipulate the tty (eg, use >CBREAK) is adding code to reset the ttystate when stopping >(eg, ^Z) and set it again when continuing. > >Why doesn't the csh keep track of this instead? The reply I'm sure you'll hear most is, then how would a program like 'stty' ever work? You'd have to layer more magic to stop the csh from undoing what stty does. Sure, we can make stty a built-in, but that makes it impossible to ever build another program which does this (and people do this kind of thing more than you might think, such as little programs or scripts to switch between two tty modes, such as when using a graphics capable terminal.) The second most frequent reply you will get is that foosh does just what you describe (where "foo" is replaced by two or three chars.) Of course, that doesn't make it a particularly good idea! It's a hard design problem and given the current state of the world would probably be better solved by writing a little library routine to handle what you want rather than re-working the OS. I'd be curious to hear how those shells that do this handle the stty problem. -Barry Shein Software Tool & Die | {xylogics,uunet}!world!bzs | bzs@world.std.com Purveyors to the Trade | Voice: 617-739-0202 | Login: 617-739-WRLD