[Tarantool-patches] [PATCH 2/2] popen: add ability to keep child on deletion
Alexander Turenko
alexander.turenko at tarantool.org
Fri Apr 10 19:45:17 MSK 2020
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 <alexander.turenko at tarantool.org>
> Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
Acked-by: Alexander Turenko <alexander.turenko at tarantool.org>
> @@ -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),
> };
More information about the Tarantool-patches
mailing list