home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!jvnc.net!yale.edu!yale!gumby!destroyer!ubc-cs!utcsri!torn!csd.unb.ca!morgan.ucs.mun.ca!nstn.ns.ca!dragon.acadiau.ca!alan
- From: alan@dragon.acadiau.ca (Alan McKay)
- Newsgroups: comp.unix.questions
- Subject: How do I convert a FILE* to an fd?
- Message-ID: <1992Jul29.184720.18679@dragon.acadiau.ca>
- Date: 29 Jul 92 18:47:20 GMT
- Organization: Acadia University
- Lines: 14
-
- I have a file opened by fopen() and now want to flock it, but
- flock expects an fd as returned by "open". Since the flocking is
- being added after my routine was written (long after), I don't want
- to re-write everthing to use open so I'd sooner just convert my
- FILE* to and fd if possible. I'd image that the fd is just a field
- in the FILE*, is this correct?
-
- Can someone tell me how to do this?
-
- --
- --
- Alan W. McKay | (902)542-2201.158 | Wolfville, N.S. Canada
- alan@acadiau.ca | Acadia University | SUB Box 6008, B0P 1Z1
- ----------------------------------------- My Canada includes Quebec -----
-