zsh-workers
 help / color / mirror / code / Atom feed
From: "Daniel Shahaf" <d.s@daniel.shahaf.name>
To: "Chris Down" <chris@chrisdown.name>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH v2 2/2] builtins: kill: Do not signal current process group when pid is empty
Date: Mon, 17 Feb 2020 14:33:04 +0000	[thread overview]
Message-ID: <615babbb-41a3-4954-831c-9a1db9882052@www.fastmail.com> (raw)
In-Reply-To: <20200217141144.GB20166@chrisdown.name>

Chris Down wrote on Mon, 17 Feb 2020 14:11 +00:00:
> Daniel Shahaf writes:
> >Chris Down wrote on Sat, Feb 15, 2020 at 20:21:09 -0400:
> >> +  trap 'exit 19' TERM
> >> +  kill ''
> >> +1:Plain kill with empty pid should not send signal to current process group
> >> +?(eval):kill:2: illegal pid:
> >
> >Should this test use a subshell so as not to kill the test suite process in
> >case the bug regresses?
> >
> >Personally, I'm partial to first adding commits in "expected to fail" mode
> >(using the «f» flag after the expected exit code) and then in a separate commit
> >fix the bug, since doing so in effect validates the test.  However, I see this
> >as a nice-to-hvae, not a blocker.
> 
> For this particular one, the subshell won't help, since we're part of the same 
> process group as make and the test runner regardless:
> 
>      make: *** [Makefile:263: check] User defined signal 1
>      make[1]: *** [Makefile:190: check] User defined signal 1
>      make[1]: Leaving directory '/home/cdown/git/zsh/Test'

Ah, right, of course.

> One possibility to avoid that is to run these few tests in a shell that's a new 
> session leader, like in W02jobs, I suppose. What do you think about that?

Making kill's tests use zpty would probably be too complicated for their
purpose.  Seeing as even now the bug would fail «make check» if it
recurs, I think we can go with what you have.

Thanks,

Daniel

  reply	other threads:[~2020-02-17 14:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-16  0:20 [PATCH v2 1/2] builtins: kill: Add basic test suite Chris Down
2020-02-16  0:21 ` [PATCH v2 2/2] builtins: kill: Do not signal current process group when pid is empty Chris Down
2020-02-16 10:39   ` Daniel Shahaf
2020-02-17 14:11     ` Chris Down
2020-02-17 14:33       ` Daniel Shahaf [this message]
2020-02-16 10:34 ` [PATCH v2 1/2] builtins: kill: Add basic test suite Daniel Shahaf
2020-02-17 13:49   ` Chris Down

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=615babbb-41a3-4954-831c-9a1db9882052@www.fastmail.com \
    --to=d.s@daniel.shahaf.name \
    --cc=chris@chrisdown.name \
    --cc=zsh-workers@zsh.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).