From nobody@FreeBSD.org  Wed Apr 18 23:16:33 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 9DCFE37B424
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 18 Apr 2001 23:16:33 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id f3J6GXi29898;
	Wed, 18 Apr 2001 23:16:33 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200104190616.f3J6GXi29898@freefall.freebsd.org>
Date: Wed, 18 Apr 2001 23:16:33 -0700 (PDT)
From: david@wmol.com
To: freebsd-gnats-submit@FreeBSD.org
Subject: CHANGE REQUEST: kill(all) -l output
X-Send-Pr-Version: www-1.0

>Number:         26695
>Category:       bin
>Synopsis:       change request: killall(1) -l output
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 18 23:20:02 PDT 2001
>Closed-Date:    Sat Jan 21 19:01:20 UTC 2012
>Last-Modified:  Sat Jan 21 19:01:20 UTC 2012
>Originator:     David
>Release:        FreeBSD 4.3-RC
>Organization:
>Environment:
FreeBSD beast.hill.hom 4.3-RC FreeBSD 4.3-RC #1: Thu Mar 29 23:30:04 EST 2001
	ocipio@beast.hill.hom:/usr/src/sys/compile/BEAST  i386
>Description:
My request changes the output of both kill -l and killall -l.  
Maybe, make `killall -ll` do the new output, and leave -l alone?

The current /usr/bin/killall -l outputs:
hup int quit ill trap abrt emt fpe kill bus segv sys pipe alrm term urg
stop tstp cont chld ttin ttou io xcpu xfsz vtalrm prof winch info usr1 usr2

The new way I think is more helpful, since it displays the numbers and actual words. (bash's way)
 1) sighup       2) sigint       3) sigquit      4) sigill 
 5) sigtrap      6) sigabrt      7) sigemt       8) sigfpe 
 9) sigkill     10) sigbus      11) sigsegv     12) sigsys 
13) sigpipe     14) sigalrm     15) sigterm     16) sigurg 
17) sigstop     18) sigtstp     19) sigcont     20) sigchld 
21) sigttin     22) sigttou     23) sigio       24) sigxcpu 
25) sigxfsz     26) sigvtalrm   27) sigprof     28) sigwinch 
29) siginfo     30) sigusr1     31) sigusr2

>How-To-Repeat:

>Fix:
--- killall.c.old       Thu Dec 28 07:14:41 2000
+++ killall.c   Thu Apr 19 02:05:17 2001
@@ -73,18 +73,23 @@
 static void
 printsig(FILE *fp)
 {
-       const char      *const * p;
-       int             cnt;
-       int             offset = 0;
-
-       for (cnt = NSIG, p = sys_signame + 1; --cnt; ++p) {
-               offset += fprintf(fp, "%s ", upper(*p));
-               if (offset >= 75 && cnt > 1) {
-                       offset = 0;
+       int     n, column;
+
+       for (n = 1, column = 0; n < NSIG; n++)
+       {
+               fprintf(fp, "%2d) sig%s%s", n, sys_signame[n],
+                       (n == NSIG -1) ? "" : " ");
+
+               if (++column < 4)
+                       fprintf(fp, "\t");
+               else {
                        fprintf(fp, "\n");
+                       column = 0;
                }
        }
+
        fprintf(fp, "\n");
+
 }

 static void

>Release-Note:
>Audit-Trail:

From: Jilles Tjoelker <jilles@stack.nl>
To: bug-followup@FreeBSD.org, david@wmol.com
Cc:  
Subject: Re: bin/26695: change request: kill(1)/killall(1) -l output
Date: Fri, 15 Oct 2010 23:20:17 +0200

 > [Adding signal numbers to kill/killall -l output]
 
 I don't think kill -l should be made not POSIX compliant to allow for
 this. killall might be changed, but this may be unlikely too given how
 long this PR has been in the system.
 
 -- 
 Jilles Tjoelker
State-Changed-From-To: open->closed 
State-Changed-By: eadler 
State-Changed-When: Sat Jan 21 19:01:19 UTC 2012 
State-Changed-Why:  
POSIX does not allow for kill -l to be changed like this (see 
http://pubs.opengroup.org/onlinepubs/007904875/utilities/kill.html ). 
killall should have similar behavior to kill. We can rely on the shell 
command completion to supply the extra info 

Thanks for making FreeBSD better! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26695 
>Unformatted:
