summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2017-09-11 15:28:55 +1000
committerTony Cook <tony@develop-help.com>2017-09-11 15:29:19 +1000
commit7bd9fb107eaf8df3da9ce46c89920f8da72c76ab (patch)
tree0fddb151b4c4e13f544f2628ad705c211af2a0b7
parentefdde84aa79557a9834e0d15f9dc4cf0fe4999b1 (diff)
downloadperl-7bd9fb107eaf8df3da9ce46c89920f8da72c76ab.tar.gz
perldelta for 9c6681cc159f
-rw-r--r--pod/perldelta.pod34
1 files changed, 34 insertions, 0 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index eb3d504414..00578892f4 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -27,6 +27,40 @@ here, but most should go in the L</Performance Enhancements> section.
[ List each enhancement as a =head2 entry ]
+=head2 In-place editing is now safer
+
+Previously in-place editing would delete or rename the input file
+as soon as you started working on a new file.
+
+Without backups this would result in loss of data if there was an
+error, such as a full disk, when writing to the output file.
+
+This has changed so that the input file isn't replaced until the
+output file has been completely written and successfully closed.
+
+This works by creating a work file in the same directory, which is
+renamed over the input file once the output file is complete.
+
+Incompatibilities:
+
+=over
+
+=item *
+
+Since this renaming needs to only happen once, if you create a thread
+or child process, that renaming will only happen in the original
+thread or process.
+
+=item *
+
+If you change directories while processing a file, and your operating
+system doesn't provide the unlinkat(), renameat() and fchmodat()
+functions, the final rename step may fail.
+
+=back
+
+[perl #127663]
+
=head1 Security
XXX Any security-related notices go here. In particular, any security