diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2009-10-12 20:01:44 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2009-10-12 20:01:44 +0400 |
commit | 9e278ffd2cfe03a1e83e09d30aa0c361905c29f8 (patch) | |
tree | 494d1af95d80141103592af519db95fcbfd536c1 | |
parent | d358c9e9b084d4154a1cf994abfe9b9d09597b3d (diff) |
* kill.cc (main): Skip to PID loop on invalid option to handle
negative pids there.
-rw-r--r-- | winsup/utils/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/utils/kill.cc | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 215706162..f3d05d9b2 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,8 @@ +2009-10-12 Corinna Vinschen <corinna@vinschen.de> + + * kill.cc (main): Skip to PID loop on invalid option to handle + negative pids there. + 2009-08-11 Corinna Vinschen <corinna@vinschen.de> * mkgroup.c (enum_local_groups): Avoid error message if given group diff --git a/winsup/utils/kill.cc b/winsup/utils/kill.cc index f43ef7762..35ed128d0 100644 --- a/winsup/utils/kill.cc +++ b/winsup/utils/kill.cc @@ -249,10 +249,8 @@ main (int argc, char **argv) case '?': if (gotasig) { - pid = strtoll (argv[optind], &p, 10); - if (pid < 0) - goto out; - usage (); + --optind; + goto out; } optreset = 1; optind = 1 + av - argv; |