Hacker News new | ask | show | jobs
by chrsm 3758 days ago
Example: Recently built a small service that responds to requests and walks various files looking for data.

The service can be asked to unload (close) the file, but it's hard to say whether it's in-use at the time without some kind of reference count to current requests using the file.

1 comments

That's kinda what dup() is for. Reference counting happens in the kernel.