packages/net/cgi-io/src
Jo-Philipp Wich 4f4a7e9532 cgi-io: use O_TMPFILE for uploads and attempt to directly link target file
Create an anonymous inode in /tmp using O_TMPFILE and attempt to link the
file in place using linkat(). Only fall back to the old file copy when
linking the tempfile fails.

Avoids double memory use if both the temporary upload file and the
destination file are located in /tmp.

Ref: https://github.com/openwrt/luci/issues/3654
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-22 18:17:33 +01:00
..
CMakeLists.txt cgi-io: cmake: enable extra compiler warnings 2019-10-11 16:03:54 +02:00
main.c cgi-io: use O_TMPFILE for uploads and attempt to directly link target file 2020-02-22 18:17:33 +01:00
multipart_parser.c cgi-io: add a small helper cgi that can be used by RPCD based UIs 2015-10-02 14:00:25 +02:00
multipart_parser.h cgi-io: add a small helper cgi that can be used by RPCD based UIs 2015-10-02 14:00:25 +02:00