home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / question / 9544 < prev    next >
Encoding:
Internet Message Format  |  1992-07-29  |  1005 b 

  1. 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
  2. From: alan@dragon.acadiau.ca (Alan McKay)
  3. Newsgroups: comp.unix.questions
  4. Subject: How do I convert a FILE* to an fd?
  5. Message-ID: <1992Jul29.184720.18679@dragon.acadiau.ca>
  6. Date: 29 Jul 92 18:47:20 GMT
  7. Organization: Acadia University
  8. Lines: 14
  9.  
  10. I have a file opened by fopen() and now want to flock it, but
  11. flock expects an fd as returned by "open".  Since the flocking is
  12. being added after my routine was written (long after), I don't want
  13. to re-write everthing to use open so I'd sooner just convert my
  14. FILE* to and fd if possible.  I'd image that the fd is just a field
  15. in the FILE*, is this correct?
  16.  
  17. Can someone tell me how to do this?
  18.  
  19. -- 
  20. --
  21. Alan W. McKay        | (902)542-2201.158    | Wolfville, N.S. Canada
  22. alan@acadiau.ca        | Acadia University    | SUB Box 6008, B0P 1Z1
  23. ----------------------------------------- My Canada includes Quebec -----
  24.