Bug 233179

Summary: FreeBSD 12.0-BETA - pkill/pgrep have 20 chars limit
Product: Base System Reporter: vermaden
Component: binAssignee: freebsd-bugs mailing list <bugs>
Status: Closed Not A Bug    
Severity: Affects Only Me CC: yuripv
Priority: ---    
Version: 12.0-STABLE   
Hardware: Any   
OS: Any   

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.