bool qFileLock ( int  fd  ) 

Lock file

Parameters:
fd file descriptor
Returns:
true if successful, otherwise returns false.
   // for file descriptor
   int fd = open(...);
   if(qFileLock(fd) == true) {
     (...atomic file access...)
     qFileUnlock(fd);
   }

   // for FILE stream object
   FILE *fp = fopen(...);
   int fd = fileno(fp);
   if(qFileLock(fd) == true) {
     (...atomic file access...)
     qFileUnlock(fd);
   }

Definition at line 65 of file qFile.c.


Generated on Mon Mar 26 07:00:51 2018 for JSOC_Documentation by  doxygen 1.5.7.1