We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
readlink("/proc/self/exe", ...)
1 parent eb75583 commit 350b76fCopy full SHA for 350b76f
1 file changed
src/runtime.c
@@ -528,9 +528,9 @@ int main(int argc, char *argv[]) {
528
* functionality specifically for builds used by appimaged.
529
*/
530
if (getenv("TARGET_APPIMAGE") == NULL) {
531
- // for some reason, `fopen("/proc/self/exe", "rb")` tries to open
532
- // the dynamic linker when running under gcompat, even though `readlink()`
533
- // gives the right result, so use `readlink()` here
+ // when running under gcompat (e.g. on Alpine Linux),
+ // `fopen("/proc/self/exe", "rb")` tries to open the dynamic linker, even
+ // though `readlink()` gives the right result, so use `readlink()` here
534
ssize_t len = readlink("/proc/self/exe", appimage_path, sizeof(appimage_path));
535
if (len < 0) {
536
perror("Failed to obtain AppImage path");
0 commit comments