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.

(cherry picked from commit 3610bffd2888b65389a46e8d075ce8e1fc83af4c)

Details

Provenance
kevansAuthored on Mar 20 2023, 7:19 PM
Parents
rG2a69943c7b65: daemon: kill off some stray blank lines
Branches
Unknown
Tags
Unknown