home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / linux / 20314 < prev    next >
Encoding:
Text File  |  1992-12-14  |  1.3 KB  |  35 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!think.com!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!ehsn11.cen.uiuc.edu!jy10033
  3. From: jy10033@ehsn11.cen.uiuc.edu (Joshua M Yelon)
  4. Subject: Re: TCP and TIOC questions (please add to FAQ) [NORMAL]
  5. References: <1992Dec14.063435.22926@tc.cornell.edu>
  6. Message-ID: <Bz8zMo.As@news.cso.uiuc.edu>
  7. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  8. Organization: University of Illinois at Urbana
  9. Date: Mon, 14 Dec 1992 11:51:59 GMT
  10. Lines: 23
  11.  
  12. kutcha@eos.acm.rpi.edu (Phillip Rzewski) writes:
  13.  
  14. >My code is looking for things like TIOCGETP...
  15.  
  16. I don't know the answers to your other questions, but I can answer
  17. this one.
  18.  
  19. TIOCGETP is one of the ioctls for BSD-style terminal control.  The
  20. other big one is TIOCSETP, and they both operate on objects of type
  21. 'struct sgtty'.
  22.  
  23. Unfortunately, Linux doesn't currently implement these.  Instead,
  24. Linux uses 'termios' (struct termios, ioctl TCGETS, ioctl TCSETS) in
  25. order to change terminal modes.
  26.  
  27. Usually, it is fairly easy to replace the sgtty stuff with termios
  28. stuff, since the relevant code is usually quite short and simple.  In
  29. fact, many packages have "ifdef" flags that allow you to choose
  30. between termios and sgtty.
  31.  
  32. - Josh
  33.  
  34. PS.  Perhaps we should put this in the FAQ.  It comes up pretty often.
  35.