Imagine the following scenario:
- Client (browser) calls a PHP script
- Script generates a ZIP file in web_root/downloads/tmp/test.zip
- Script returns headers accordingly and therefore initiates a download of that ZIP file
- Script terminates the directory web_root/downloads/tmp/
What could happen?
- Server queues deletion and deletes folder as soon as possible
- Directory (and file) are deleted and the client therefore loses the connection
- Server declines deletion because directory is somehow locked
- Apache actually clones/caches files before streaming them, so that deleting the original will have no effect
Which one is correct?
Now, i could test this behaviour on my own server, but what i want to know is whether there exists any sort of convention that defines UNIX/LINUX based standard behaviour in such a case?
How are such cases handled in general?