Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!giza.cis.ohio-state.edu!karl_kleinpaste From: karl_kleinpaste@giza.cis.ohio-state.edu Newsgroups: comp.unix.wizards Subject: Re: csh / bsd job control Message-ID: Date: 21 Mar 90 19:01:33 GMT References: <22821@adm.BRL.MIL> Sender: usenet_news@tut.cis.ohio-state.edu Organization: Ohio State Computer Science Lines: 27 bzs@cs.bu.edu writes: 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. Not really... I'd be curious to hear how those shells that do this handle the stty problem. The SysV csh I built took care of the problem reasonably trivially. When a job _stopped_, csh would restore the tty state it knew before the job was started. When the job was restarted, csh would re-assert the tty state it had when the job last stopped. When a job _ended_, the tty state was not messed with, on the assumption that the job knew what it was doing if it changed things. stty works fine on this basis. And things like Emacs and vi could be stopped without causing confusion. It was very useful to be simulating job control in a non-job-control environment when dealing with this problem, since I had to assume that the job had no clue whatever that it might possibly be stopped; csh's interaction with such stuff had to be completely transparent. --karl