home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / question / 9553 < prev    next >
Encoding:
Text File  |  1992-07-29  |  1.4 KB  |  36 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!sun-barr!cs.utexas.edu!convex!tchrist
  3. From: Tom Christiansen <tchrist@convex.COM>
  4. Subject: Re: How do I convert a FILE* to an fd?
  5. Message-ID: <1992Jul29.233948.1931@convex.com>
  6. Originator: tchrist@convex.convex.com
  7. Sender: usenet@convex.com (news access account)
  8. Nntp-Posting-Host: convex.convex.com
  9. Reply-To: tchrist@convex.COM (Tom Christiansen)
  10. Organization: CONVEX Realtime Development, Colorado Springs, CO
  11. References: <1992Jul29.184720.18679@dragon.acadiau.ca>
  12. Date: Wed, 29 Jul 1992 23:39:48 GMT
  13. X-Disclaimer: This message was written by a user at CONVEX Computer
  14.               Corp. The opinions expressed are those of the user and
  15.               not necessarily those of CONVEX.
  16. Lines: 18
  17.  
  18. From the keyboard of alan@dragon.acadiau.ca (Alan McKay):
  19. :I have a file opened by fopen() and now want to flock it, but
  20. :flock expects an fd as returned by "open".  Since the flocking is
  21. :being added after my routine was written (long after), I don't want
  22. :to re-write everthing to use open so I'd sooner just convert my
  23. :FILE* to and fd if possible.  I'd image that the fd is just a field
  24. :in the FILE*, is this correct?
  25. :
  26. :Can someone tell me how to do this?
  27.  
  28. RTFstdioM.
  29.  
  30. --tom
  31. -- 
  32. "GUIs normally make it simple to accomplish simple actions and impossible
  33. to accomplish complex actions."   --Doug Gwyn  (22/Jun/91 in comp.unix.wizards)
  34.  
  35.      Tom Christiansen           tchrist@convex.com      convex!tchrist
  36.