Closed Robsteranium closed 1 year ago
Turns out this isn't a problem after all because of the way unlink
works. See unlink(2).
If the name was the last link to a file but any processes still have the file open the file will remain in existence until the last file descriptor referring to it is closed.
There's a risk that the cache file of subject URIs could be deleted before we've finished reading from it. @callum-oakley's suggestion is to read eagerly, moving processing into the read loop. Please see #124 for the specifics.
If we see e.g. errors about trying to read from closed files then we ought to prioritise this.