home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / question / 15147 < prev    next >
Encoding:
Text File  |  1993-01-04  |  1.1 KB  |  26 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!spool.mu.edu!yale.edu!ira.uka.de!smurf.sub.org!flatlin!bad
  3. From: bad@flatlin.ka.sub.org (Christoph Badura)
  4. Subject: Re: Novice programming question: How to pass stdin to tcgetattr?
  5. Organization: Guru Systems/Funware Department
  6. Date: Mon, 4 Jan 1993 12:23:02 GMT
  7. Message-ID: <C0Bx2F.F8y@flatlin.ka.sub.org>
  8. References: <9212291904.AA07073@public.btr.com.BTR.COM>
  9. Lines: 15
  10.  
  11. In <9212291904.AA07073@public.btr.com.BTR.COM> rem@public.btr.com (Robert E. Maas  rem@btr.com) writes:
  12. >How do I convert stdin (a pointer to a word containing the number zero)
  13. >to a valid integer fd (file descriptor I presume) for passing to
  14. >tcgetattr and related functions?
  15.  
  16. If fp is a file pointer (stdin, stdout, stderr or obtained via the
  17. fopen(3) family of libary functions) the expression "fileno(fp)"
  18. returns the associated file descriptor.
  19.  
  20. The system include files reside under /usr/include.
  21. -- 
  22.                 Christoph Badura  ---  bad@flatlin.ka.sub.org
  23.  
  24. Personally, I don't care whether someone is cool enough to quote Doug
  25. Gwyn--I only care whether Doug Gwyn is cool enough to quote. -- Larry Wall
  26.