Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH ALTERNATE] builtins: kill: Do not set signal on current pgroup when pid is empty



Daniel Shahaf writes:
Chris Down wrote on Sat, 15 Feb 2020 09:52 -0400:
There are two ways to solve this issue:

1. Add special handling to `kill` to avoid this case. See this patch[0]
   for a version that does that.
2. Change how isanum behaves. Since the only two call sites that use it
   both seem like they should handle the case where the input char array
   is empty, that seems like a reasonable overall change to me, but
   either works.

Thanks for the patch and the revisions.  I prefer #2.  If no one
objects (or says POSIX requires «kill ''» to be equivalent to
«kill 0»…) I'll apply it.

Sure thing, thanks.

It would be nice to have a regression test for this.
Test/C03traps.ztst has the examples, but the test should be added to
a B*.ztst file (probably a new one).  Would you happen to have time to
look into this?  No worries if not.

No worries, I've got time. I'll send v2 in a little while with the updates.

Thanks for the review!

Chris



Messages sorted by: Reverse Date, Date, Thread, Author