Bug 233179 - FreeBSD 12.0-BETA - pkill/pgrep have 20 chars limit
Summary: FreeBSD 12.0-BETA - pkill/pgrep have 20 chars limit
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.0-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-12 19:40 UTC by vermaden
Modified: 2019-09-17 11:58 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vermaden 2018-11-12 19:40:45 UTC
As in title.

These commands will fail:
# pkill gvfs-hal-volume-monitor
# pgrep gvfs-hal-volume-monitor

These commands work:
# pkill gvfs-hal-volume-mon
# pgrep gvfs-hal-volume-mon
Comment 1 Yuri Pankov freebsd_committer 2019-09-16 22:53:29 UTC
This is likely due to command name having size of (COMMLEN + 1) (which is 19 + 1 for terminating NUL character) in struct kinfo_proc.  Note that pgrep in linux seems to have the same limitation. Use `pgrep -f` (match against full argument list) for workaround.
Comment 2 vermaden 2019-09-17 11:58:28 UTC
(In reply to Yuri Pankov from comment #1)
Thank You for this, missed that in the man page.

Regards.