<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi!<div class="">I addressed your comments regarding all the 3 patches and</div><div class="">sent v4 for review («<span style="color: rgba(0, 0, 0, 0.85098); font-family: "Helvetica Neue";" class="">[PATCH v4 0/2] box: implement on_shutdown triggers</span>»)</div><div class=""><br class=""></div><div class="">As for this particular patch, I made it independent from the next one,</div><div class="">so it may be dropped altogether if you wish.</div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">28 дек. 2018 г., в 10:58, Vladimir Davydov <<a href="mailto:vdavydov.dev@gmail.com" class="">vdavydov.dev@gmail.com</a>> написал(а):</div><br class="Apple-interchange-newline"><div class=""><div class="">On Fri, Dec 28, 2018 at 10:43:26AM +0300, Konstantin Osipov wrote:<br class=""><blockquote type="cite" class="">* Vladimir Davydov <<a href="mailto:vdavydov.dev@gmail.com" class="">vdavydov.dev@gmail.com</a>> [18/12/27 16:00]:<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">On Tue, Dec 11, 2018 at 04:24:38PM +0300, Serge Petrenko wrote:<br class=""><blockquote type="cite" class="">Move a call to tarantool_free() to the end of main().<br class="">Also instead of breaking the event loop directly when processing a<br class="">signal start a fiber which can do some work before event loop break and<br class="">then break the event loop (this will be helpful when on_shutdown<br class="">triggers are implemented to run them while ev loop active).<br class="">Only wal_thread_stop() is left in atexit() to make sure we close the<br class="">journal in case the user exits by typing os.exit() to the console.<br class=""></blockquote><br class="">I don't understand why you need to do it in the scope of the issue<br class="">you're intending to fix. You can start a fiber from SITERM/SIGINT signal<br class="">handler and run on_shutdown triggers from it without atexit rework,<br class="">right?<br class=""></blockquote><br class="">I asked Sergey to refactor our atexit machinery. I want atexit<br class="">handlers to be able to run the event loop, all such handlers, not<br class="">just the exit trigger.<br class=""></blockquote><br class="">But this isn't what this patch does - it just moves some code from<br class="">atexit() to the end of main, after the event loop is stopped.<br class=""></blockquote><br class="">This is OK for existing handlers, since they don't require an<br class="">event loop today. <br class=""></blockquote><br class="">Then why move them from atexit() to the end of main()? It doesn't<br class="">achieve anything, it doesn't have anything to do with on_shutdown<br class="">trigger. For some reason, we just stop freeing memory if the program<br class="">terminates by exit()-ing.<br class=""><br class=""></div></div></blockquote></div><br class=""></div></body></html>