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