From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 520D346970F for ; Thu, 28 Nov 2019 00:51:49 +0300 (MSK) Received: by mail-lf1-f66.google.com with SMTP id m30so16535246lfp.8 for ; Wed, 27 Nov 2019 13:51:49 -0800 (PST) Date: Thu, 28 Nov 2019 00:51:47 +0300 From: Konstantin Osipov Message-ID: <20191127215147.GB31812@atlas> References: <20191126151557.25754-1-sergepetrenko@tarantool.org> <20191126205620.GC23422@atlas> <20191127160751.GF2472@uranus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191127160751.GF2472@uranus> Subject: Re: [Tarantool-patches] [PATCH] clear terminal state on panic List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov Cc: tarantool-patches@dev.tarantool.org * Cyrill Gorcunov [19/11/27 19:12]: > On Tue, Nov 26, 2019 at 11:56:20PM +0300, Konstantin Osipov wrote: > > * Serge Petrenko [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