home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / bsd / 3161 < prev    next >
Encoding:
Internet Message Format  |  1992-07-29  |  2.6 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!mips!sdd.hp.com!elroy.jpl.nasa.gov!ames!pasteur!cory.Berkeley.EDU!sim
  2. From: sim@cory.Berkeley.EDU (Peng-Toh Sim)
  3. Newsgroups: comp.unix.bsd
  4. Subject: Re: 386BSD: Dinky little socket(?) bug -- ^V as escape character?
  5. Summary: POSIX termios
  6. Message-ID: <1992Jul30.011650.5292@pasteur.Berkeley.EDU>
  7. Date: 30 Jul 92 01:16:50 GMT
  8. References: <sand.712454840@milton>
  9. Sender: nntp@pasteur.Berkeley.EDU (NNTP Poster)
  10. Organization: University of California, at Berkeley
  11. Lines: 46
  12. Nntp-Posting-Host: cory
  13.  
  14. In article <sand.712454840@milton> sand@milton.u.washington.edu (Derek Upham) writes:
  15. >I've noticed the following problem while running "screen" on 386BSD
  16. >(both of these from the vanilla bin01 and etc01 sources): control-v
  17. >needs to be typed twice for it to be received by a process.  For
  18. >example, under tcsh, the key sequence
  19. >
  20. >        echo ^V^G
  21. >
  22. >which should enter a literal ^G (BEL, 0x7) on the command line, simply
  23. >beeps.  Similarly, "^V^B", which should enter a literal ^B (0x2),
  24. >moves the cursor back one space.  Both of these DO work correctly when
  25. >you type two ^V characters instead of one.  Inserting some suitable
  26. >printf's in "screen" indicates that the problem occurs before the data
  27. >stream reaches the program---somewhere in the pty or socket code,
  28. >looks like.  Anyone else noticed this problem?
  29. >
  30. >Derek
  31. >
  32. >-- 
  33. >Derek Lynn Upham                                     University of Washington
  34. >sand@u.washington.edu                University Computing Services Operations
  35. >=============================================================================
  36. >"Ha!  Your Leaping Tiger Kung Fu is no match for my Frightened Piglet Style!"
  37.  
  38. Hi
  39.  
  40. I believe this bug is due to misinterpretation of POSIX.1 .
  41. I have seen this bug under 0.0 with screen3.2 and kermit 5a.
  42. When screen3.2 or kermit is compiled with POSIX.1 termios, it
  43. switches to RAW mode by resetting ICANON in c_lflags for the
  44. terminal.  This, however, does not disable IEXTEN under the
  45. current implementation of 386bsd, so keys enabled by IEXTEN like
  46. ^V still gets processed.  Since with screen (or kermit), you go
  47. though the tty discipline twice, ^V gets processed twice.
  48. Example, if you want to enter ^V itself, you have to hit it four times!!!
  49. I figure this from "POSIX Programmer's Guide" by Donald Lewine.
  50. However, this book does not say if the kernel should ignore IEXTEN when
  51. ICANON is not set.  So I don't know who's bug this is.
  52. My modified version of screen3.2 and kermit disables the IEXTEN flag
  53. when they switch to RAW mode so I don't see this problem.
  54.  
  55. Can somebody who has access to the actual POSIX.1 document comment
  56. on this please?
  57.  
  58. PT
  59. sim@cory.berkeley.edu
  60.