2 % (c) The GRASP/AQUA Project, Glasgow University, 1994
4 \subsection[closeFile.lc]{hClose Runtime Support}
18 if ( unlockFile(fileno((FILE *) fp)) ) {
19 /* If the file has already been unlocked (or an entry
20 for it in the locking tables couldn't be found), could
23 - we're repeating an hClose on an already
24 closed file (this is likely to be a bug
25 in the implementation of hClose, as this
26 condition should have been caught before
29 - the file wasn't locked in the first place!
30 (file descriptors to non regular files.)
32 We proceed with attempting to close the file,
33 but don't flag the error should fclose() return
40 while ((rc = fclose((FILE *) fp)) != 0) {
41 /* See above comment */
42 if ( errno != EINTR && (!unlocked && errno != EBADF ) ) {