HomeFreeBSD

pkill: use an ARG_MAX size buffer for argument matching

Description

pkill: use an ARG_MAX size buffer for argument matching

Right now pkill/pgrep cut off at _POSIX2_LINE_MAX (2048), but argument
strings can be much larger (ARG_MAX is 256K/512K). Stop arbitrarily
cutting the search off at 2K, rather than documenting the limit.

Reviewed by: allanjude (earlier version), des
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D38663

Details

Provenance
kevansAuthored on Mar 20 2023, 7:19 PM
Reviewer
allanjude
Differential Revision
D38663: pkill: use an ARG_MAX size buffer for argument matching
Parents
rGc3179891f897: kerneldump: Inline dump_savectx() into its callers
Branches
Unknown
Tags
Unknown