home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / shell / 5142 < prev    next >
Encoding:
Text File  |  1992-12-23  |  1.4 KB  |  43 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!gatech!udel!darwin.sura.net!spool.mu.edu!sdd.hp.com!col.hp.com!fc.hp.com!pbm
  3. From: pbm@fc.hp.com (Peter McLain)
  4. Subject: Re: Exiting KSH with ^D
  5. Sender: news@fc.hp.com (news daemon)
  6. Message-ID: <BzpywD.6tw@fc.hp.com>
  7. Date: Wed, 23 Dec 1992 15:55:25 GMT
  8. References: <1992Dec19.195724.10742@Celestial.COM>
  9. Organization: Hewlett-Packard Fort Collins Site
  10. X-Newsreader: TIN [version 1.1.3 PL6]
  11. Lines: 30
  12.  
  13. : This problem would occur if your eof is something other than
  14. : ctrl-d.  Look at stty -a output to see what your settings are.
  15. : Here's part of stty -a from my Xenix 2.3.4 system.
  16. : speed extb baud; line = 0; intr = DEL; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = ^@; swtch = ^@
  17.  
  18.  
  19.     Be careful how you get the stty output.  If you just do "stty -a" from
  20.     the ksh prompt, you will NOT get the settings that ksh uses.  ksh keeps
  21.     track of two sets of tty settings.  One for its own use while it is
  22.     reading input from the user; the other is used as the settings for the
  23.     tty for jobs.
  24.  
  25.     E.g.,  if I'm on ttyt4, and do:
  26.  
  27.     $ stty -a                  # done from ttyt4
  28.     ... eof = ^D; eol =^@
  29.  
  30.     But, if from a different window, I do:
  31.  
  32.     $ stty -a < /dev/ttyt4     # NOT done from ttyt4
  33.     ... eof = ^[; eol = ^M
  34.  
  35.     The first shows the tty settings that ksh sets up for jobs that it
  36.     spawns, the second shows the tty settings that ksh uses for the editing
  37.     modes.
  38.  
  39. Peter McLain
  40. pbm@fc.hp.com
  41.