From: Craig Small Date: Thu, 25 May 2006 00:03:20 +0000 (+0000) Subject: sync to new server X-Git-Tag: v22.11~76 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bef2afd06f2ccd41fb9a97eb35f7043b0e1a815f;p=psmisc sync to new server --- diff --git a/ChangeLog b/ChangeLog index a9d46bb..25eb527 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ Changes in 22.3 ================ +2006-04-05 Karel Zak + * fuser return code set correcly in silent mode + * fuser -l doesnt complain but list signal names only + 2006-03-24 Craig Small * Updated Bulgarian and Italian PO files * Added Japanese and Hungarian PO files diff --git a/src/fuser.c b/src/fuser.c index d7dc9e5..93cd398 100644 --- a/src/fuser.c +++ b/src/fuser.c @@ -695,7 +695,7 @@ int main(int argc, char *argv[]) break; case 'l': list_signals(); - break; + return 0; case 'm': opts |= OPT_MOUNTS; break; @@ -849,7 +849,9 @@ static int print_matches(struct names *names_head, const opt_type opts, const in int have_match = 0; for (nptr = names_head; nptr != NULL ; nptr = nptr->next) { - if (! (opts & OPT_SILENT)) { /* We're not silent */ + if (opts & OPT_SILENT) { + have_match = nptr->matched_procs ? 1 : have_match; + } else { /* We're not silent */ if (nptr->matched_procs != NULL || opts & OPT_ALLFILES) { if (head == 0 && opts & OPT_VERBOSE) { fprintf(stderr, _("\n%*s USER PID ACCESS COMMAND\n"), @@ -919,7 +921,7 @@ static int print_matches(struct names *names_head, const opt_type opts, const in putc('\n', stderr); } /* be silent */ if (opts & OPT_KILL) - kill_matched_proc(nptr->matched_procs, opts, sig_number); + kill_matched_proc(nptr->matched_procs, opts, sig_number); } /* next name */ return (have_match==1?0:1);