From: a k <you...@ya...> - 2004-12-06 15:45:12
|
Miklos: From the kernel sources (2.4) (at end of message): It seems that the structure filp has the reference count: filp->f_count So could this not be used to inform the user if this is the final flush on a file? (filp_close) if (filp->f_op && filp->f_op->flush) { lock_kernel(); retval = filp->f_op->flush(filp); unlock_kernel(); } (fput) if (atomic_dec_and_test(&file->f_count)) { locks_remove_flock(file); if (file->f_iobuf) free_kiovec(1, &file->f_iobuf); if (file->f_op && file->f_op->release) file->f_op->release(inode, file); Alan --- Miklos Szeredi <mi...@sz...> wrote: > > If there was a way to check in the kernel whether > any file descriptors > are still refering to an open file I could pass that > information to > userspace, but I think it's not possible, but I'll > recheck this. > > __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo |