home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / programm / 5224 < prev    next >
Encoding:
Text File  |  1992-11-09  |  1.0 KB  |  28 lines

  1. Newsgroups: comp.unix.programmer
  2. Path: sparky!uunet!munnari.oz.au!mel.dit.csiro.au!kimba.catt.citri.edu.au!jck
  3. From: jck@kimba.catt.citri.edu.au (Justin Kibell)
  4. Subject: lockf problem on SparcStation 2
  5. Message-ID: <1992Nov10.014453.1427@mel.dit.csiro.au>
  6. Keywords: lockf
  7. Sender: jck@kimba (Justin Kibell)
  8. Organization: CATT Centre at CITRI, Melbourne, Australia
  9. Date: Tue, 10 Nov 92 01:44:53 GMT
  10. Lines: 16
  11.  
  12. I am currently trying to get file locking for a program I am working on and
  13. it isn't working to well.
  14.  
  15. My question is, can you use fd = fileno(fp) where fp is (FILE *fp) and then 
  16. pass the result to lockf(fd, F_LOCK, 0L)? The result I get is :- 
  17.  
  18. lockf: Bad file number
  19.  
  20. I've checked permissions on files etc and it just ain't working. :-(
  21.  
  22. SparcStation 2 - OS 4.1.2
  23.  
  24. Justin Kibell: SDL 88 GR Case Tool Development Project - XMelba Version 0.13
  25.                Centre for Advanced Technology in Telecommunications    
  26.                Collaborative Information Technology Research Institute
  27.                jck@jaguar.catt.citri.edu.au        Phone: +61 3 282 2456
  28.