Merge pull request #20630 from Homebrew/pid_path-libSystem

utils/pid_path: use libSystem
This commit is contained in:
Bo Anderson 2025-09-03 21:26:12 +00:00 committed by GitHub
commit 1c959c22ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,7 +7,9 @@ raise "Missing `pid` argument!" unless pid
require "fiddle" require "fiddle"
libproc = Fiddle.dlopen("/usr/lib/libproc.dylib") # Canonically, this is a part of libproc.dylib. libproc is however just a symlink to libSystem
# and some security tools seem to not support aliases from the dyld shared cache and incorrectly flag this.
libproc = Fiddle.dlopen("/usr/lib/libSystem.B.dylib")
libproc_proc_pidpath_function = Fiddle::Function.new( libproc_proc_pidpath_function = Fiddle::Function.new(
libproc["proc_pidpath"], libproc["proc_pidpath"],