The latter will surely depend on your operating system and its file handling semantics. In general, in Windows if something is reading a file and you delete the file, then you're actually deleting the file and the reader will be interrupted (assuming you manage to set it up in a way such that you actually can delete the file at all). In Linux, when you delete a file, you are actually unlinking the file from the directory, so the reader maintains a reference to the actual file and can carry on as normal. The free space will be reclaimed when the reference count decreases to zero when the reader closes the file.