We are using this for creating userns namespaces, and we really
shouldn't try to sync there. Moreover the use of free() in shutdown code
doesn't need it anyway, since it just sync()ed right before anyway. Only
the third user of freeze() we have actually needs the syc(), hence do it
there and nowhere else.
/* Make sure nobody waits for us on a socket anymore */
(void) close_all_fds_full(NULL, 0, false);
- sync();
-
/* Let's not freeze right away, but keep reaping zombies. */
for (;;) {
siginfo_t si = {};
}
log_emergency("Freezing execution.");
+ sync();
freeze();
}