diff options
author | Craig Small <csmall@enc.com.au> | 2015-03-15 09:08:12 +1100 |
---|---|---|
committer | Craig Small <csmall@enc.com.au> | 2015-03-15 09:08:12 +1100 |
commit | 7c5cb8660921c1e73375d9e3869def11b09ee3ae (patch) | |
tree | 43be1bb4b6ca87ce99d1c7c8f66763724d8cd774 /src | |
parent | 05a66f193ccf3878f204f79845ff90672fb640ec (diff) |
fuser: -k return status based on any found
In [bugs:#66] the ever-helpful "Anonymous" reported that
fuser with -k would only return correctly if the process
was found last and not if it was found anywhere.
While I have solved this problem a different way, the report
was enough to narrow down what was going wrong. Now fuser -k
returns 1 if it finds any process to kill, not just if the last
one was; just like fuser with no -k works.
Signed-off-by: Craig Small <csmall@enc.com.au>
Diffstat (limited to 'src')
-rw-r--r-- | src/fuser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fuser.c b/src/fuser.c index 4e16d67..4eeac7d 100644 --- a/src/fuser.c +++ b/src/fuser.c @@ -1397,7 +1397,7 @@ print_matches(struct names *names_head, const opt_type opts, } } /* be silent */ if (opts & OPT_KILL) - have_kill = kill_matched_proc(nptr->matched_procs, + have_kill |= kill_matched_proc(nptr->matched_procs, opts, sig_number); } /* next name */ |