diff options
author | Daniil Baturin <daniil@baturin.org> | 2023-02-09 16:17:50 +0000 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2023-02-09 16:17:50 +0000 |
commit | cc8f94b3791135ad764de03e518a1c46f050f456 (patch) | |
tree | 83b689f2be0b14df7eda5084410f3a59c6109290 | |
parent | 0f42786a0b3d151cd4c783a8581ad8bb3d1f9b05 (diff) | |
download | vyatta-cfg-cc8f94b3791135ad764de03e518a1c46f050f456.tar.gz vyatta-cfg-cc8f94b3791135ad764de03e518a1c46f050f456.zip |
commit: T4990: call sync after the commit completes
-rw-r--r-- | src/commit/commit-algorithm.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/commit/commit-algorithm.cpp b/src/commit/commit-algorithm.cpp index 13d3500..f04b8c2 100644 --- a/src/commit/commit-algorithm.cpp +++ b/src/commit/commit-algorithm.cpp @@ -14,6 +14,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <unistd.h> + #include <cstdio> #include <vector> #include <string> @@ -1358,6 +1360,8 @@ commit::doCommit(Cstore& cs, CfgNode& cfg1, CfgNode& cfg2) ret = cs.markSessionUnsaved(); } + sync(); + setenv("COMMIT_STATUS", cst, 1); _execute_hooks(POST_COMMIT); unsetenv("COMMIT_STATUS"); |