chiark / gitweb /
fileio: simplify mkostemp_safe() (#4090)
authorTopi Miettinen <topimiettinen@users.noreply.github.com>
Tue, 13 Sep 2016 06:20:38 +0000 (06:20 +0000)
committerSven Eden <yamakuzure@gmx.net>
Wed, 5 Jul 2017 06:50:53 +0000 (08:50 +0200)
commit8d0461b82d5084290e9bfb71ab4aa848df196b50
treea46f378c63da01f7dfb02975d3d8bb3eb01c5fca
parent2aa9a6ee147f5dab268d9546af3ef3749153dadd
fileio: simplify mkostemp_safe() (#4090)

According to its manual page, flags given to mkostemp(3) shouldn't include
O_RDWR, O_CREAT or O_EXCL flags as these are always included. Beyond
those, the only flag that all callers (except a few tests where it
probably doesn't matter) use is O_CLOEXEC, so set that unconditionally.
src/basic/fileio.c
src/basic/fileio.h