Hello again,

the previous minimal patch to ash.c only
cured one symptom. The present patch 
continues to cure the full decease for
the builtin usage

kill -l [numerical signal list]

in order that it conforms with my bash builtin
on Debian. The ash builtin usage description
for 'kill -l' was nonsense and the code was
corrupt. The present patch ought to restore matters,
and my testing shows an acceptable behaviour.

Regards,        Mats E A
diff -Na -u1 ash.c.orig ash.c
--- ash.c.orig	2007-04-11 16:25:57.206837280 +0200
+++ ash.c	2007-04-11 18:40:44.183429968 +0200
@@ -3528,3 +3528,3 @@
 "usage: kill [-s sigspec | -signum | -sigspec] [pid | job]... or\n"
-"kill -l [exitstatus]"
+"kill -l [numerical signals]"
 		);
@@ -3575,3 +3575,3 @@
 				name = get_signame(i);
-				if (isdigit(*name))
+				if (!isdigit(*name))
 					out1fmt(snlfmt, name);
@@ -3580,6 +3580,9 @@
 		}
-		name = get_signame(signo);
-		if (!isdigit(*name))
-			ash_msg_and_raise_error("invalid signal number or exit status: %s", *argptr);
-		out1fmt(snlfmt, name);
+		while (*argv) {
+			name = get_signame( get_signum(*argv) );
+			if (isdigit(*name))
+				ash_msg_and_raise_error("invalid signal number or exit status: %s", *argv);
+			out1fmt(snlfmt, name);
+			argv++;		/* argv could not be incremented earlier, due to error message. */
+		}
 		return 0;
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to