You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try filling CFProcessPath with argv[0] on OpenBSD.
There is no native mechanism to get the running process path on OpenBSD.
Currently, the shell needs to cooperate and fill in the path. This
works, but not all shells set the `_` environment variable.
We however are able to get `argv[0]` via sysctl on this platform.
Instead of just trying `_` and then giving up otherwise, first try
getting `argv[0]`. If that appears to be an absolute path, then we can
likely assume that this is what we need; otherwise, search PATH.
On other BSD platforms, this sysctl may need to be modified or an
alternative mechanism supplied to get `argv[0]`, so we still fallback on
`getenv("_")`.
0 commit comments