On 10/29/21 6:09 PM, enh via austin-group-l at The Open Group wrote:
On Fri, Oct 29, 2021 at 5:45 PM Robert Elz <[email protected]> wrote:
| it's definitely unfortunate that the -k option is not part of POSIX
Sorry, no idea what that is, all I know of fuser is what POSIX says about
it.
-k automates the 80% use case of fuser --- "kill the things using this
file^Wmount point". (the other 20% being "output diagnostics for some human to
look at later".)
Looking at what I can see in SVR3, it appears "fuser -k" was used in the RFS
scripts to kill processes using a remote file system when the server was going
down. But I can't imagine why fuser would do the output interleaving if it
wasn't intended for use as "kill `fuser /mnt`", so I wonder if -k wasn't in
the original versions.
The source even has a comment about the output being intended to be fed to kill:
https://www.tuhs.org/cgi-bin/utree.pl?file=pdp11v/usr/src/cmd/fuser.c
https://www.tuhs.org/cgi-bin/utree.pl?file=SunOS-4.1.4/usr.etc/rfs/fuser/fuser.c
In SVR4, fuser -k was also used in the umountall script, if the -k option was
passed to umountall.
--
-Alan Coopersmith- [email protected]
Oracle Solaris Engineering - https://blogs.oracle.com/alanc