home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / gnu / bash / bug / 548 < prev    next >
Encoding:
Text File  |  1992-08-13  |  1.6 KB  |  39 lines

  1. Newsgroups: gnu.bash.bug
  2. Path: sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!odin.ins.cwru.edu!chet
  3. From: chet@odin.ins.cwru.edu (Chet Ramey)
  4. Subject: Re: output of background jobs in BASH
  5. Message-ID: <9208131434.AA00639.SM@odin.INS.CWRU.Edu>
  6. Sender: gnulists@ai.mit.edu
  7. Reply-To: chet@po.cwru.edu
  8. Organization: GNUs Not Usenet
  9. References: chet@odin.ins.cwru.edu (Chet Ramey)
  10. Distribution: gnu
  11. Date: Thu, 13 Aug 1992 06:34:47 GMT
  12. Approved: bug-bash@prep.ai.mit.edu
  13. Lines: 24
  14.  
  15. > I believe that this changed when I installed bash 1.12: when I put a job that
  16. > prints on stdout in background (^Z/bg or directly by &), the output comes out
  17. > staggered, as if the CR wasn't being added to the LF at the end of the lines.
  18.  
  19. This is a result of bash using the BSD-style tty driver on Ultrix.  The BSD
  20. driver ties input and output carriage return translation together with the
  21. CRMOD bit.  (The CRMOD bit causes CR->LF translation on input and LF->CRLF
  22. translation on output.)  Unless the CRMOD bit is cleared, it is impossible
  23. to get a literal ^M in an input line.  Unfortunately, one of the effects of
  24. clearing it is the loss of output processing you've observed. 
  25.  
  26. The Ultrix Posix-style tty driver can't be used because it has serious
  27. problems with losing typeahead when ICANON is switched on and off.  These
  28. characters seem to reappear later without warning, usually when a
  29. program that uses the BSD-style ioctls turns on CBREAK (e.g., `more').
  30.  
  31. Chet
  32.  
  33. --
  34. ``The use of history as therapy means the corruption of history as history.''
  35.     -- Arthur Schlesinger
  36.  
  37. Chet Ramey, Case Western Reserve University    Internet: chet@po.CWRU.Edu
  38.  
  39.