lib/deploy: Use _exit() for FIFREEZE watchdog

This works around an (IMO) SpiderMonkey bug - it tries to
clean up in a shared library destructor, but doesn't install a
`pthread_atfork()` handler to unset its state.

Closes: https://github.com/ostreedev/ostree/issues/1262

Closes: #1264
Approved by: dbnicholson
This commit is contained in:
Colin Walters authored and Atomic Bot committed 2017-10-11 21:24:39 +00:00
1 parent 1825f03fe7
commit 8f6ec62bfb
1 file changed
+6 -1
+6 -1
View File
@@ -1301,7 +1301,12 @@ fsfreeze_thaw_cycle (OstreeSysroot *self,
}
if (debug_fifreeze)
g_printerr ("fifreeze watchdog was run\n");
exit (EXIT_SUCCESS);
/* We use _exit() rather than exit() to avoid tripping over any shared
* libraries in process that aren't fork() safe; for example gjs/spidermonkey:
* https://github.com/ostreedev/ostree/issues/1262
* This doesn't help for the err()/errx() calls above, but eh...
*/
_exit (EXIT_SUCCESS);
}
else /* Parent process. */
{