[uWSGI] remove file after sendfile

Damjan Georgievski gdamjan at gmail.com
Fri Mar 18 14:17:36 CET 2016

> if you have a file descriptor open you can unlink the file from the
> filesystem, the file will be actually removed once the fd is closed.

> Wouldn't uwsgi cleanup my psgi application before passing name to an
> "offload thread"? Also, afaik unlinking with open fd would make file not
> accessible by name from the current process or any other.
> Just in case people don't know what I'm talking about, we use the
> following solution
> http://uwsgi-docs.readthedocs.org/en/latest/Snippets.html#x-sendfile-emulation

I thought you were using sendfile(2) from your code.

maybe you can use rpc action in the routing, to trigger a remove of the
file once it's offloaded.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.unbit.it/pipermail/uwsgi/attachments/20160318/f66a5160/attachment.html>

More information about the uWSGI mailing list