home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!sun-barr!cs.utexas.edu!convex!tchrist
- From: Tom Christiansen <tchrist@convex.COM>
- Subject: Re: How do I convert a FILE* to an fd?
- Message-ID: <1992Jul29.233948.1931@convex.com>
- Originator: tchrist@convex.convex.com
- Sender: usenet@convex.com (news access account)
- Nntp-Posting-Host: convex.convex.com
- Reply-To: tchrist@convex.COM (Tom Christiansen)
- Organization: CONVEX Realtime Development, Colorado Springs, CO
- References: <1992Jul29.184720.18679@dragon.acadiau.ca>
- Date: Wed, 29 Jul 1992 23:39:48 GMT
- X-Disclaimer: This message was written by a user at CONVEX Computer
- Corp. The opinions expressed are those of the user and
- not necessarily those of CONVEX.
- Lines: 18
-
- From the keyboard of alan@dragon.acadiau.ca (Alan McKay):
- :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?
-
- RTFstdioM.
-
- --tom
- --
- "GUIs normally make it simple to accomplish simple actions and impossible
- to accomplish complex actions." --Doug Gwyn (22/Jun/91 in comp.unix.wizards)
-
- Tom Christiansen tchrist@convex.com convex!tchrist
-