This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #134221) preserve O_APPEND for open ... undef calls.
authorTony Cook <tony@develop-help.com>
Tue, 16 Jul 2019 05:59:29 +0000 (15:59 +1000)
committerTony Cook <tony@develop-help.com>
Tue, 16 Jul 2019 05:59:29 +0000 (15:59 +1000)
commit910b8b92a5c097593b840ac1eee578d2da08ad44
treed51488c4218e0f6407eeac7a0d1dc586884c458d
parentdc9ac3ee562166ff93b09c2b5a63cc5c51748c7f
parent74b421cc877e412c4eda06757396a1e19fc756ba
(perl #134221) preserve O_APPEND for open ... undef calls.

For most systems this means switching from mkstemp() to mkostemp(),
which Zefram helpfully added an emulation for.

For Win32 the append seems to happen in the POSIX emulation, not in
WriteFile(), so we can simply supply the flags to _open_osfhandle().

After some discussion with Craig Berry, the VMS version of the code
now uses largely the same mkostemp() code, with some special code in
the mkostemp() emulation to allow marking the file to be deleted
automatically when closed.