diff options
author | Daniil Baturin <daniil@vyos.io> | 2023-11-10 14:50:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-10 14:50:08 +0000 |
commit | 8976c04b0ec8735b292810b6fb89a762b0a9add0 (patch) | |
tree | a1257e6e4e0424027e0ce7dda558253038d8aa50 /src | |
parent | 2eb30a51aae84c3b3fe316b12f0b44b9a8527131 (diff) | |
parent | f8d269b20ac109027bac135238cfee3bfc18d220 (diff) | |
download | vyatta-cfg-8976c04b0ec8735b292810b6fb89a762b0a9add0.tar.gz vyatta-cfg-8976c04b0ec8735b292810b6fb89a762b0a9add0.zip |
commit: T4990: call sync after the commit completes (backport #59)
Diffstat (limited to 'src')
-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"); |