From: Benno Schulenberg <bensberg@justemail.net>
To: util-linux@vger.kernel.org
Subject: [PATCH 1/2] textual: fix the usage message of kill
Date: Wed, 9 Jul 2014 15:29:09 +0200 [thread overview]
Message-ID: <1404912550-2573-1-git-send-email-bensberg@justemail.net> (raw)
Using angular brackets around each individual argument, indenting a
continuation line, not using a space before =, improving some wordings,
and the argument of --queue is a value (a piece of data), not a signal.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
misc-utils/kill.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/misc-utils/kill.c b/misc-utils/kill.c
index 5d2f27d..f2362c3 100644
--- a/misc-utils/kill.c
+++ b/misc-utils/kill.c
@@ -303,17 +303,17 @@ static int arg_to_signum(char *arg, int maskbit)
static void __attribute__((__noreturn__)) usage(FILE *out)
{
fputs(USAGE_HEADER, out);
- fprintf(out, _(" %s [options] <pid|name>...\n"), program_invocation_short_name);
+ fprintf(out, _(" %s [options] <pid>|<name>...\n"), program_invocation_short_name);
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --all do not restrict the name-to-pid conversion to processes\n"
- " with the same uid as the present process\n"), out);
- fputs(_(" -s, --signal <sig> send specified signal\n"), out);
+ " with the same uid as the present process\n"), out);
+ fputs(_(" -s, --signal <signal> send this <signal> instead of SIGTERM\n"), out);
#ifdef HAVE_SIGQUEUE
- fputs(_(" -q, --queue <sig> use sigqueue(2) rather than kill(2)\n"), out);
+ fputs(_(" -q, --queue <value> use sigqueue(2), not kill(2), and pass <value> as data\n"), out);
#endif
fputs(_(" -p, --pid print pids without signaling them\n"), out);
- fputs(_(" -l, --list [=<signal>] list signal names, or convert one to a name\n"), out);
+ fputs(_(" -l, --list[=<signal>] list signal names, or convert a signal number to a name\n"), out);
fputs(_(" -L, --table list signal names and numbers\n"), out);
fputs(_(" --verbose print pids that will be signaled\n"), out);
@@ -423,15 +423,15 @@ static char **parse_arguments(int argc, char **argv, struct kill_control *ctl)
* So it's probably something like -HUP, or -1/-n try to
* deal with it.
*
- * -n could be signal n, or pid -n (i.e., process group
- * number). In case of doubt POSIX tells us to assume a
- * signal. If a signal has been parsed, assume it is a
- * pid, break. */
+ * -n could be either signal n or pid -n (a process group
+ * number). In case of doubt, POSIX tells us to assume a
+ * signal. But if a signal has already been parsed, then
+ * assume it is a process group, so stop parsing options. */
if (ctl->do_kill)
break;
arg++;
if ((ctl->numsig = arg_to_signum(arg, 0)) < 0)
- errx(EXIT_FAILURE, _("invalid sigval argument"));
+ errx(EXIT_FAILURE, _("invalid signal name or number: %s"), arg);
ctl->do_kill = 1;
if (ctl->do_pid)
errx(EXIT_FAILURE, _("%s and %s are mutually exclusive"), "--pid", "--signal");
--
1.7.0.4
next reply other threads:[~2014-07-09 13:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-09 13:29 Benno Schulenberg [this message]
2014-07-09 13:29 ` [PATCH 2/2] docs: fix many wording and some formatting issues in the man page of kill Benno Schulenberg
2014-07-14 13:53 ` Karel Zak
2014-07-14 13:48 ` [PATCH 1/2] textual: fix the usage message " Karel Zak
2014-07-14 13:55 ` Benno Schulenberg
2014-07-14 14:17 ` Karel Zak
2014-07-14 14:44 ` Benno Schulenberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1404912550-2573-1-git-send-email-bensberg@justemail.net \
--to=bensberg@justemail.net \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox