aboutsummaryrefslogtreecommitdiff
path: root/winsup/utils
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-05-13 05:23:37 +0000
committerChristopher Faylor <me@cgf.cx>2002-05-13 05:23:37 +0000
commit30feaa22dd68242100ef011b937589c5e7fe83be (patch)
tree7e6c7ccdfdfaf526678070b0c82ee449f213379c /winsup/utils
parent65791b5de3ed5efc3fb84389e551e945b2b2424c (diff)
downloadnewlib-30feaa22dd68242100ef011b937589c5e7fe83be.zip
newlib-30feaa22dd68242100ef011b937589c5e7fe83be.tar.gz
newlib-30feaa22dd68242100ef011b937589c5e7fe83be.tar.bz2
* kill.cc (usage): Show new options. Allow specification of output stream.
(main): Implement 'h' option.
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/ChangeLog6
-rw-r--r--winsup/utils/kill.cc10
2 files changed, 13 insertions, 3 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index fb3f60f..8784805 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/utils/ChangeLog
@@ -1,5 +1,11 @@
2002-05-13 Christopher Faylor <cgf@redhat.com>
+ * kill.cc (usage): Show new options. Allow specification of output
+ stream.
+ (main): Implement 'h' option.
+
+2002-05-13 Christopher Faylor <cgf@redhat.com>
+
* Makefile.in (kill.exe): Add as a specific target.
* kill.cc (longopts): New.
(opts): Ditto.
diff --git a/winsup/utils/kill.cc b/winsup/utils/kill.cc
index da1721f..6c72f05 100644
--- a/winsup/utils/kill.cc
+++ b/winsup/utils/kill.cc
@@ -32,10 +32,11 @@ static char opts[] = "hl::fs:";
extern "C" const char *strsigno (int);
static void
-usage (void)
+usage (FILE *where = stderr)
{
- fprintf (stderr, "Usage: kill [-sigN] pid1 [pid2 ...]\n");
- exit (1);
+ fputs ("usage: kill [-signal] [-s signal] pid1 [pid2 ...]\n"
+ " kill -l [signal]\n", where);
+ exit (where == stderr ? 1 : 0);
}
static int
@@ -140,6 +141,9 @@ main (int argc, char **argv)
case 'f':
force = 1;
break;
+ case 'h':
+ usage (stdout);
+ break;
case '?':
if (gotsig)
usage ();