os: Use sysctl(KERN_PROC_ARGS) in DetermineClientCmd() on FreeBSD
Inspired by 0ea9b595. At runtime depends on !1047 (merged).
/proc
has been removed on DragonFly + OpenBSD and deprecated on FreeBSD + NetBSD. One can get char **argv
via kinfo_getproc(3) + procstat_getargv(3) or kvm_getprocs(3) + kvm_getargv(3) (API is slightly different than OpenBSD) but since arguments have to be concatenated let's use sysctl(3) + KERN_PROC_ARGS
also supported on DragonFly.
CC @manu, @arichardson