[Tarantool-patches] [PATCH] clear terminal state on panic

Konstantin Osipov kostja.osipov at gmail.com
Thu Nov 28 00:51:47 MSK 2019


* Cyrill Gorcunov <gorcunov at gmail.com> [19/11/27 19:12]:
> On Tue, Nov 26, 2019 at 11:56:20PM +0300, Konstantin Osipov wrote:
> > * Serge Petrenko <sergepetrenko at tarantool.org> [19/11/26 18:17]:
> > > The tarantool_free() call in the end of main() works all the time except
> > > when we exit due to a panic. We need to clear terminal state in this
> > > case also, so return to using atexit() to clear readline state.
> > 
> > This comment belongs to the code, not just to the changeset
> > comment.
> > 
> > Nobody is going to read the changset comment when introducing
> > _exit() or moving it over to somewhere else.
> 
> Should not we rather provide some tarantool_atexit() helper
> from where we would call other cleanup and etc routines?
> We already have tarantool_atfork() hook. Not a big deal
> but while the code in question is being modified anyway.

Why not, still the exit procedure is complicated because of
on_shutdown triggers, so it's important that if there are changes
to it, they are documented in the code, not in cs comments.

-- 
Konstantin Osipov, Moscow, Russia


More information about the Tarantool-patches mailing list