Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid trying to figure out the executable’s file name at runtime (when possible) #1987

Open
zamfofex opened this issue Dec 14, 2024 · 1 comment

Comments

@zamfofex
Copy link

zamfofex commented Dec 14, 2024

I’m trying to set up a pkgsrc package for Lite XL (for NetBSD). It works mostly fine, except for how it tries to detect the executable’s file name. After installing, when I run lite-xl, it crashes, because it ends up falling back to argv[0], which doesn’t have a slash (so the regex in the Lua code in main.c fails to match).

Turns out NetBSD supports /proc/self/exe like Linux, but that is discouraged (because /proc might not be available) in favor of using sysctl similar to FreeBSD, but very subtly differently.

However, that seems to be one of the very small bits of non‐portable code in Lite XL, so I was wondering if it could be avoided, at least outside of the “portable” build, in favor of just relying on the prefix from Meson. (Or otherwise perhaps with an extra build flag.)

@takase1121
Copy link
Member

I think all our official binaries are portable builds though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants