Skip to content

Commit

Permalink
runtime: reword comment about readlink("/proc/self/exe", ...)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-zeid committed Feb 1, 2022
1 parent eb75583 commit 350b76f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,9 @@ int main(int argc, char *argv[]) {
* functionality specifically for builds used by appimaged.
*/
if (getenv("TARGET_APPIMAGE") == NULL) {
// for some reason, `fopen("/proc/self/exe", "rb")` tries to open
// the dynamic linker when running under gcompat, even though `readlink()`
// 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
ssize_t len = readlink("/proc/self/exe", appimage_path, sizeof(appimage_path));
if (len < 0) {
perror("Failed to obtain AppImage path");
Expand Down

0 comments on commit 350b76f

Please sign in to comment.