From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) (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 DA10F46970F for ; Wed, 27 Nov 2019 19:07:53 +0300 (MSK) Received: by mail-lf1-f65.google.com with SMTP id d6so17636329lfc.0 for ; Wed, 27 Nov 2019 08:07:53 -0800 (PST) Date: Wed, 27 Nov 2019 19:07:51 +0300 From: Cyrill Gorcunov Message-ID: <20191127160751.GF2472@uranus> References: <20191126151557.25754-1-sergepetrenko@tarantool.org> <20191126205620.GC23422@atlas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191126205620.GC23422@atlas> 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: Konstantin Osipov Cc: tarantool-patches@dev.tarantool.org 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.