Auto-delete lock files on CGI exit
authorJamie Cameron <jcameron@webmin.com>
Sun, 2 Dec 2007 21:02:52 +0000 (21:02 +0000)
committerJamie Cameron <jcameron@webmin.com>
Sun, 2 Dec 2007 21:02:52 +0000 (21:02 +0000)
CHANGELOG
web-lib-funcs.pl

index 3165d4c..2ee70c2 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -80,3 +80,4 @@ When read_file_lines is used to read a file, the Unix or Windows newlines will b
 ---- Changes since 1.380 ----
 Added a search box to the left frame of the blue theme, for finding modules, config options, help pages and text.
 All images, CSS and other static content served by Webmin has an HTTP Expires for 1 week in the future, to improve cachability.
+Lock files are automatically removed when the process creating them exits.
index 56b3b7c..3ceb858 100755 (executable)
@@ -3147,6 +3147,7 @@ while(1) {
                        close(LOCKING);
                        }
                $main::locked_file_list{$realfile} = int($_[1]);
+               push(@main::temporary_files, "$realfile.lock");
                if (($gconfig{'logfiles'} || $gconfig{'logfullfiles'}) &&
                    !$_[1]) {
                        # Grab a copy of this file for later diffing