From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp45.i.mail.ru (smtp45.i.mail.ru [94.100.177.105]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 892514696C3 for ; Fri, 10 Apr 2020 19:45:19 +0300 (MSK) Date: Fri, 10 Apr 2020 19:45:17 +0300 From: Alexander Turenko Message-ID: <20200410164517.sngjouuvyn6txtes@tkn_work_nb> References: <20200410144021.5704-1-gorcunov@gmail.com> <20200410144021.5704-3-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200410144021.5704-3-gorcunov@gmail.com> Subject: Re: [Tarantool-patches] [PATCH 2/2] popen: add ability to keep child on deletion List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov Cc: tml On Fri, Apr 10, 2020 at 05:40:21PM +0300, Cyrill Gorcunov wrote: > Currently popen_delete kills all children process. > Moreover we use popen_delete on tarantool exit. > > Alexander pointed out that keep children running > even if tarantool is exited is still needed. > > Reported-by: Alexander Turenko > Signed-off-by: Cyrill Gorcunov Acked-by: Alexander Turenko > @@ -489,8 +489,11 @@ popen_delete(struct popen_handle *handle) > return -1; > } > > - if (popen_send_signal(handle, SIGKILL) && errno != ESRCH) > + if ((handle->flags & POPEN_FLAG_KEEP_CHILD) == 0) { > + if (popen_send_signal(handle, SIGKILL) && > + errno != ESRCH) > return -1; > + } Please, rebase after the patchset 'Popen Lua API: preliminary patches', which was pushed to master. > + /* > + * Keep child rinning on delete. > + */ Typo: rinning. > + POPEN_FLAG_KEEP_CHILD_BIT = 17, > + POPEN_FLAG_KEEP_CHILD = (1 << POPEN_FLAG_KEEP_CHILD_BIT), > };