From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id cc6ae334 for ; Sat, 15 Feb 2020 15:15:59 +0000 (UTC) Received: (qmail 4313 invoked by alias); 15 Feb 2020 15:15:52 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45432 Received: (qmail 23997 invoked by uid 1010); 15 Feb 2020 15:15:52 -0000 X-Qmail-Scanner-Diagnostics: from mail-wr1-f68.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25718. spamassassin: 3.4.2. Clear:RC:0(209.85.221.68):SA:0(-2.0/5.0):. Processed in 3.633797 secs); 15 Feb 2020 15:15:52 -0000 X-Envelope-From: chris@chrisdown.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.221.68 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=ESbqMH8wTS6UeMT2HEBnd6N4ELlqVGvzVn+meQfqmxA=; b=j94Ou5mHZDhdViGxYtCV44GVt9Td3GskVNHSZaI+/WlgpXJuUVffxBcEDK4RKwfSWQ n4KzrMbVCn99xYpJh0zG7HGbUxm/PRbMDAEZrFPr1lCr2kZXr2Fh+nwefs+PmvESw6oO uSlAcvfom9dhWhbhwE5/QwFY5N3rYTYCnatuau1XEY+uGsEJQl9F4TvXcwUeLfTHKwvn Yjo0OpHPLPhEnP79QIw9HHqXq173FMp0X6iHo7Q7iVG97MxXhXbiYSmgnYhoipNsABFR OyqBe1ej+GFGLY/fhrYoxxm2UeZPOrKiHSj4cW+BY9NnklXghShGwHaoT0eIGsoSSiDB F+lw== X-Gm-Message-State: APjAAAWMNqRIEwNInVJKXmi0GpRKLkSoCHSzhIisImmcQuF8VA4UB9TP 1CxDq9e3qP3ALnwI0iLSXuQui9rggDXzJw== X-Google-Smtp-Source: APXvYqwB0EXFfzHEivdgI1QrPvI748xXFN4fDIUG6HFw53Le5bRPXiIvHeUE0hf1yfavalAYGii9sA== X-Received: by 2002:adf:d0c1:: with SMTP id z1mr11224186wrh.371.1581779714361; Sat, 15 Feb 2020 07:15:14 -0800 (PST) Date: Sat, 15 Feb 2020 11:15:02 -0400 From: Chris Down To: Daniel Shahaf Cc: zsh-workers@zsh.org Subject: Re: [PATCH ALTERNATE] builtins: kill: Do not set signal on current pgroup when pid is empty Message-ID: <20200215151502.GA670375@chrisdown.name> References: <20200214151556.GA624243@chrisdown.name> <20200215135248.GA662294@chrisdown.name> <20200215141004.2e68a381@tarpaulin.shahaf.local2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200215141004.2e68a381@tarpaulin.shahaf.local2> 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