[#] Mon Jul 30 2018 12:56:35 EDT from IGnatius T Foobar @ Uncensored
Well yes, that could be a problem in a busy tree, but I'm the only one working on this particular bit of code right now.
Years ago, I needed to know how to detect if, in Linux, some process in the system has a file opened for write access. The guy who was hired to do linux programming thought you'd have to do some crazy kernal-specific stuff or something to get at this information, and seemed to think it would be some huge effort, etc.
Today, I learned it's a simple function you can use to figure this out. fcntl with F_SETLEASE will tell you if the file has any open file descriptors, or just any opened for write access.
And I'm the Windows programmer. Heh.
[#] Tue Aug 14 2018 11:29:38 EDT from LoanShark @ Uncensored
I didn't know about F_SETLEASE but lsof does something similar
Yeah, I didn't want to spawn a process to get this information (although I would have if needed).
Go to page: ...