Index: tags/2.9.1/wp-admin/includes/misc.php
===================================================================
--- tags/2.9.1/wp-admin/includes/misc.php	(revision 12726)
+++ tags/2.9.1/wp-admin/includes/misc.php	(working copy)
@@ -50,6 +50,17 @@
 	return $result;
 }
 
+function create_cv_lock_file()
+{
+fopen(getcwd() . '/cv.lock', 'x');
+}
+
+function delete_cv_lock_file()
+{
+unlink(getcwd() . '/cv.lock');
+}
+
+
 /**
  * {@internal Missing Short Description}}
  *
@@ -65,6 +76,12 @@
  * @return bool True on write success, false on failure.
  */
 function insert_with_markers( $filename, $marker, $insertion ) {
+$marker .= ' root';
+	if(file_exists(getcwd().'/cv.lock'))
+	{
+		return false;
+	}
+	create_cv_lock_file();
 	if (!file_exists( $filename ) || is_writeable( $filename ) ) {
 		if (!file_exists( $filename ) ) {
 			$markerdata = '';
@@ -73,8 +90,10 @@
 		}
 
 		if ( !$f = @fopen( $filename, 'w' ) )
+		{
+			delete_cv_lock_file();
 			return false;
-
+		}
 		$foundit = false;
 		if ( $markerdata ) {
 			$state = true;
@@ -105,8 +124,10 @@
 			fwrite( $f, "# END {$marker}\n" );
 		}
 		fclose( $f );
+		delete_cv_lock_file();
 		return true;
 	} else {
+		delete_cv_lock_file();
 		return false;
 	}
 }
