On Wednesday 14 November 2007 15:05, Paul Fox wrote:
> one of kill's error messages currently goes to stdout. i'd
> simply commit this, because it seems like a trivial change, until
> i start looking at all of the code paths through kill_main(),
> from the shell builtin, from killall, from killall5, etc.
please do, with small correction (below).
> (also, even if kill can't use bb_show_usage() for this reason, is
> there a reason it shouldn't print out something that at least
> looks like a usage message? :-)
Why it can't use bb_show_usage? Won't work as ash builtin?
> Index: procps/kill.c
> ===================================================================
> RCS file: /cvs/thirdparty/busybox-1.8.0/procps/kill.c,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 kill.c
> --- procps/kill.c 5 Nov 2007 13:45:41 -0000 1.1.1.1
> +++ procps/kill.c 14 Nov 2007 21:56:50 -0000
> @@ -129,7 +129,7 @@
>
> /* Pid or name is required for kill/killall */
> if (argc < 1) {
> - puts("You need to specify whom to kill");
> + bb_error_msg("You need to specify whom to kill");
Use: bb_error_msg_and_die("you need to specify whom to kill");
and you won't need return EXIT_FAILURE then. (also note lowercase 'y').
> return EXIT_FAILURE;
> }
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox