diff options
author | Daniil Baturin <daniil@baturin.org> | 2023-02-09 16:17:50 +0000 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2023-11-10 14:40:13 +0000 |
commit | f8d269b20ac109027bac135238cfee3bfc18d220 (patch) | |
tree | a1257e6e4e0424027e0ce7dda558253038d8aa50 | |
parent | 2eb30a51aae84c3b3fe316b12f0b44b9a8527131 (diff) | |
download | vyatta-cfg-f8d269b20ac109027bac135238cfee3bfc18d220.tar.gz vyatta-cfg-f8d269b20ac109027bac135238cfee3bfc18d220.zip |
commit: T4990: call sync after the commit completes
(cherry picked from commit cc8f94b3791135ad764de03e518a1c46f050f456)
-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 1909ca9..a6ce3b0 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> @@ -1302,6 +1304,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"); |