The branch main has been updated by markj:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=3ef02a3d2e853766916a4f80e40ad8ba134b0363

commit 3ef02a3d2e853766916a4f80e40ad8ba134b0363
Author:     Ricardo Branco <rbra...@suse.de>
AuthorDate: 2025-06-20 18:04:07 +0000
Commit:     Mark Johnston <ma...@freebsd.org>
CommitDate: 2025-06-20 22:24:10 +0000

    kill: Fix support for kill -0
    
    Signed-off-by: Ricardo Branco <rbra...@suse.de>
    
    Fixes:          36679f7d7b56 ("kill: Use POSIX str2sig()")
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/1733
---
 bin/kill/kill.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bin/kill/kill.c b/bin/kill/kill.c
index ca9d557c5883..606c6917bbcf 100644
--- a/bin/kill/kill.c
+++ b/bin/kill/kill.c
@@ -99,7 +99,9 @@ main(int argc, char *argv[])
                argc--, argv++;
        } else if (**argv == '-' && *(*argv + 1) != '-') {
                ++*argv;
-               if (str2sig(*argv, &numsig) < 0)
+               if (strcmp(*argv, "0") == 0)
+                       numsig = 0;
+               else if (str2sig(*argv, &numsig) < 0)
                        nosig(*argv);
                argc--, argv++;
        }

Reply via email to