From cffd2ea49bfab10825340242704301c2cd472408 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 22 Apr 2007 03:59:10 +0000 Subject: [PATCH] Call sync with the lock held before allowing a new party to come along and start writing to config.xml. --- etc/inc/config.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/inc/config.inc b/etc/inc/config.inc index 50f70da47b..760f26e4cd 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -1040,11 +1040,11 @@ function write_config($desc="Unknown", $backup = true) { fclose($fd); } - config_unlock(); - /* tell kernel to sync fs data */ mwexec("/bin/sync"); + config_unlock(); + return $config; }