Tarantool development patches archive
 help / color / mirror / Atom feed
From: Alexander Turenko <alexander.turenko@tarantool.org>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: tml <tarantool-patches@dev.tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH 1/2] popen: Allow to kill process group
Date: Sun, 12 Apr 2020 04:40:30 +0300	[thread overview]
Message-ID: <20200412014030.qqf3kuoqhfys2jyn@tkn_work_nb> (raw)
In-Reply-To: <20200412012758.d4pk7qia7pqjp2vr@tkn_work_nb>

On Sun, Apr 12, 2020 at 04:27:59AM +0300, Alexander Turenko wrote:
> > +	/*
> > +	 * Killing group of signals allowed for a new
> > +	 * session only where it makes sense, otherwise
> > +	 * child gonna inherit group and we will be killing
> > +	 * ourself.
> > +	 */
> > +	if (opts->flags & POPEN_FLAG_GROUP_SIGNAL &&
> > +	    (opts->flags & POPEN_FLAG_SETSID) == 0) {
> > +		diag_set(IllegalParams,
> > +			 "popen: group signal without setting sid");
> > +		return NULL;
> > +	}
> > +
> 
> Since the patchset with the preliminary patches is land to master and it
> contains formal list of possible errors for popen_new(), I propose the
> following addition:
> 
> diff --git a/src/lib/core/popen.c b/src/lib/core/popen.c
> index 593e72d4d..fcc562734 100644
> --- a/src/lib/core/popen.c
> +++ b/src/lib/core/popen.c
> @@ -812,6 +812,8 @@ signal_reset(void)
>   *
>   * Possible errors:
>   *
> + * - IllegalParams: a parameter check fails:
> + *   - group signal is set, while setsid is not.
>   * - SystemError: dup(), fcntl(), pipe(), vfork() or close() fails
>   *   in the parent process.
>   * - SystemError: (temporary restriction) one of std{in,out,err}

Ouch, no, ignore it.

I added the list in the another patchset, which is under development for
now.

So I'll add the IllegalParams error to the list together with other
errors.

Sorry for noise.

WBR, Alexander Turenko.

  reply	other threads:[~2020-04-12  1:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-10 14:40 [Tarantool-patches] [PATCH 0/2] popen: provide more flags Cyrill Gorcunov
2020-04-10 14:40 ` [Tarantool-patches] [PATCH 1/2] popen: Allow to kill process group Cyrill Gorcunov
2020-04-10 16:41   ` Alexander Turenko
2020-04-12  1:27   ` Alexander Turenko
2020-04-12  1:40     ` Alexander Turenko [this message]
2020-04-10 14:40 ` [Tarantool-patches] [PATCH 2/2] popen: add ability to keep child on deletion Cyrill Gorcunov
2020-04-10 16:45   ` Alexander Turenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200412014030.qqf3kuoqhfys2jyn@tkn_work_nb \
    --to=alexander.turenko@tarantool.org \
    --cc=gorcunov@gmail.com \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 1/2] popen: Allow to kill process group' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox