From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 2/7] kill: align with howto-usage-function.txt
Date: Thu, 7 Mar 2013 23:27:19 +0000 [thread overview]
Message-ID: <1362698844-21292-3-git-send-email-kerolasa@iki.fi> (raw)
In-Reply-To: <1362698844-21292-1-git-send-email-kerolasa@iki.fi>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
misc-utils/kill.c | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/misc-utils/kill.c b/misc-utils/kill.c
index e43f23a..2b6256c 100644
--- a/misc-utils/kill.c
+++ b/misc-utils/kill.c
@@ -405,14 +405,25 @@ static void printsignals (FILE *fp)
fputc ('\n', fp);
}
-static int usage (int status)
+static int usage(int status)
{
- FILE *fp;
-
- fp = (status == 0 ? stdout : stderr);
- fprintf (fp, _("usage: %s [ -s signal | -p ] [ -a ] pid ...\n"), progname);
- fprintf (fp, _(" %s -l [ signal ]\n"), progname);
- return status;
+ FILE *out;
+ out = (status == 0 ? stdout : stderr);
+
+ fputs(USAGE_HEADER, out);
+ fprintf(out, _(" %s [options] <pid | commandname> [...]\n"), program_invocation_short_name);
+ fputs(USAGE_OPTIONS, out);
+ fputs(_(" -a, --all all commands including not same uid as parent process\n"), out);
+ fputs(_(" -s, --signal <sig> send specified signal\n"), out);
+ fputs(_(" -q, --queue <sig> use sigqueue(2) rather than kill(2)\n"), out);
+ fputs(_(" -p, --pid print pids without signaling them\n"), out);
+ fputs(_(" -l, --list <name> list signal names\n"), out);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(USAGE_HELP, out);
+ fputs(USAGE_VERSION, out);
+ fprintf(out, USAGE_MAN_TAIL("kill(1)"));
+
+ return status;
}
static int kill_verbose (char *procname, int pid, int sig)
--
1.8.1.5
next prev parent reply other threads:[~2013-03-07 23:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-07 23:27 [PATCH 0/7] kill: modernization after undeprecation Sami Kerola
2013-03-07 23:27 ` [PATCH 1/7] kill: add long options Sami Kerola
2013-03-07 23:27 ` Sami Kerola [this message]
2013-03-07 23:27 ` [PATCH 3/7] kill: use libc error printing facilities and exit values Sami Kerola
2013-03-07 23:27 ` [PATCH 4/7] kill, procs: fix coding style Sami Kerola
2013-03-07 23:27 ` [PATCH 5/7] kill, procs: move function declarations to kill.h Sami Kerola
2013-03-07 23:27 ` [PATCH 6/7] kill, procs: use pid_t for pids Sami Kerola
2013-03-07 23:27 ` [PATCH 7/7] docs: add long options and tidy up kill.1 Sami Kerola
2013-03-12 14:29 ` [PATCH 0/7] kill: modernization after undeprecation Karel Zak
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=1362698844-21292-3-git-send-email-kerolasa@iki.fi \
--to=kerolasa@iki.fi \
--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