Hawthorne SF#3135157
* killall creates right size buffer instead of MAX_PATH Debian #623425
* check for /proc/$$/stat not /proc/self/stat which is not available
- on hurb platforms. Same Debian bug as above
+ on hurd platforms. Same Debian bug as above
+ * fuser understands IPv6 addresses, removed comment in fuser.1 that it
+ doesn't Debian #609904
+ * fuser -k only returns 0 if you kill something.
Changes in 22.13
================
-.TH FUSER 1 2009-11-23 "Linux" "User Commands"
+.TH FUSER 1 2011-06-19 "Linux" "User Commands"
.SH NAME
fuser \- identify processes using files or sockets
.SH SYNOPSIS
\fBudp\fR and \fBtcp\fR name spaces, and UNIX domain sockets can't be
searched with kernels older than 1.3.78.
.PP
-\fBudp\fR and \fBtcp\fR currently work with IPv6 and IPv4, but the
-address fields can only be IPv4 addresses.
-.PP
Accesses by the kernel are only shown with the \fB\-v\fR option.
.PP
The \fB\-k\fR option only works on processes. If the user is the kernel,
* Based on fuser.c Copyright (C) 1993-2005 Werner Almesberger and Craig Small
*
* Completely re-written
- * Copyright (C) 2005-2010 Craig Small
+ * Copyright (C) 2005-2011 Craig Small
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
return 0;
case 'm':
opts |= OPT_MOUNTS;
+ read_proc_mounts(&mounts);
break;
case 'M':
opts |= OPT_ISMOUNTPOINT;
struct passwd *pwent = NULL;
int have_match = 0;
int have_kill = 0;
- int name_has_procs;
+ int name_has_procs = 0;
for (nptr = names_head; nptr != NULL; nptr = nptr->next) {
if (opts & OPT_SILENT) {
- have_match = nptr->matched_procs ? 1 : have_match;
+ if (nptr->matched_procs != NULL)
+ have_match = 1;
} else { /* We're not silent */
if ((opts & OPT_ALLFILES) == 0) {
name_has_procs = 0;
opts, sig_number);
} /* next name */
- return (have_match == 1 ? 0 : 1);
+ if (opts & OPT_KILL)
+ return (have_kill == 1 ? 0 : 1);
+ else
+ return (have_match == 1 ? 0 : 1);
}