diff options
| author | Marcio Giaxa <i@mgxm.me> | 2018-12-18 16:22:20 -0200 |
|---|---|---|
| committer | Marcio Giaxa <i@mgxm.me> | 2018-12-19 18:42:00 -0200 |
| commit | 9900f94afe5556db048b4b147bbf75ff0e0c9974 (patch) | |
| tree | 13fa41829db8973d445e8b9ffad9856d2681c8a4 /src | |
| parent | 1811e7e6c96844a8381e6a69017948cae0b8b261 (diff) | |
| download | zig-9900f94afe5556db048b4b147bbf75ff0e0c9974.tar.gz zig-9900f94afe5556db048b4b147bbf75ff0e0c9974.zip | |
freebsd: use sysctl to get the current executable path
FreeBSD doesn't mount procfs as default on the base system, so we can't
depend on it to get the current path, In this case, we use sysctl(3) to
retrieves the system information and get the same information.
- CTL_KERN: High kernel limits
- KERN_PROC: Return selected information about specific running
processes.
- KERN_PROC_PATHNAME: The path of the process
- Process ID: a process ID of -1 implies the current process.
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions
