HomeClusterLabs Projects

Filesystem: stop/get_pids to be signaled

Description

Filesystem: stop/get_pids to be signaled

The "safe" way to get process ids that may be using a particular filesystem
currently uses shell globs ("find /proc/[0-9]*").
With a million processes (and/or a less capable shell),
that may result in "Argument list too long".

Replace with find /proc -path "/proc/[0-9]*" instead.
While at it, also fix the non-posix -or to be -o,
and add explicit grouping parentheses \( \) and explicit -print.

Add a comment to not include "interesting" characters in mount point names.

Details

Event Timeline

Lars Ellenberg <lars.ellenberg@linbit.com> committed rRb42d698f12aa: Filesystem: stop/get_pids to be signaled (authored by Lars Ellenberg <lars.ellenberg@linbit.com>).Sep 18 2024, 7:42 AM