Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH v2 2/2] builtins: kill: Do not signal current process group when pid is empty
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author