home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / linux / 15701 < prev    next >
Encoding:
Text File  |  1992-11-04  |  1.7 KB  |  44 lines

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!sun-barr!cs.utexas.edu!ut-emx!ccwf.cc.utexas.edu
  2. From: ifai645@ccwf.cc.utexas.edu (Paul C. Janzen)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: ioctl()
  5. Keywords: ioctl(), TIOCSETP, TIOCGETP, ICANNON, CBREAK
  6. Message-ID: <83063@ut-emx.uucp>
  7. Date: 5 Nov 92 04:43:16 GMT
  8. References: <1992Nov3.070008.29001@news2.cis.umn.edu> <Bx7uAo.IB7@lysator.liu.se>
  9. Sender: news@ut-emx.uucp
  10. Organization: The University of Texas at Austin, Austin TX
  11. Lines: 31
  12.  
  13. In article <Bx7uAo.IB7@lysator.liu.se> aronsson@lysator.liu.se (Lars Aronsson) writes:
  14. >lash0002@student.tc.umn.edu (tim) writes:
  15. >>i'm looking for are TIOCGETP, TIOCSETP, ICANNON or CBREAK, and
  16. >>TIOCGLTC. 
  17.  
  18. >TIOCGETP/TIOCSETP are not supported in LINUX. They might be standard,
  19. >but I don't think they are POSIX. Instead, use TCGETA/TCSETA to
  20. >read/set terminal driver parameters.
  21. >
  22. >Most free software packages that I have seen have a large #ifdef
  23. >surrounding the use of TIOCGETP/TIOSETP with TCGETA/TCSETA appearing
  24. >in the #else branch. When you find this, you are lucky. Just use the
  25. >-D or -U options to gcc when you compile, or edit "config.h" (or
  26. >whatever that file might be called) to #define the right token.
  27.  
  28. The Posix Way involves no ioctl's. It uses 
  29.  
  30. #include <termios.h>
  31. #include <unistd.h>
  32.  
  33. int tcgetattr(int fildes, struct termios *tp); and
  34. int tcsetattr(int fildes, int options, const struct termios *tp);
  35.  
  36. instead. 
  37.  
  38. Is the behavior of TIOCGETP/friends the same as TCGETA/friends?
  39.  
  40. ------------------------------------------------------------------------
  41. Paul C. Janzen                There is a green, multi-legged creature
  42. ifai645@ccwf.cc.utexas.edu    crawling on your shoulder.
  43. ------------------------------------------------------------------------
  44.