mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-31 03:20:28 +08:00
* kill.cc (usage): Show new options. Allow specification of output stream.
(main): Implement 'h' option.
This commit is contained in:
parent
65791b5de3
commit
30feaa22dd
@ -1,3 +1,9 @@
|
|||||||
|
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>
|
2002-05-13 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* Makefile.in (kill.exe): Add as a specific target.
|
* Makefile.in (kill.exe): Add as a specific target.
|
||||||
|
@ -32,10 +32,11 @@ static char opts[] = "hl::fs:";
|
|||||||
extern "C" const char *strsigno (int);
|
extern "C" const char *strsigno (int);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
usage (void)
|
usage (FILE *where = stderr)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "Usage: kill [-sigN] pid1 [pid2 ...]\n");
|
fputs ("usage: kill [-signal] [-s signal] pid1 [pid2 ...]\n"
|
||||||
exit (1);
|
" kill -l [signal]\n", where);
|
||||||
|
exit (where == stderr ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -140,6 +141,9 @@ main (int argc, char **argv)
|
|||||||
case 'f':
|
case 'f':
|
||||||
force = 1;
|
force = 1;
|
||||||
break;
|
break;
|
||||||
|
case 'h':
|
||||||
|
usage (stdout);
|
||||||
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
if (gotsig)
|
if (gotsig)
|
||||||
usage ();
|
usage ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user