Skip to content

Commit

Permalink
opcache: more reliable way to get the current binary on solaris/illumos
Browse files Browse the repository at this point in the history
Closes GH-6920.
  • Loading branch information
devnexen authored and nikic committed May 6, 2021
1 parent dd3e56b commit d87d2f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions ext/opcache/jit/zend_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ void zend_elf_load_symbols(void)
}
int fd = open(path, O_RDONLY);
#elif defined(__sun)
const char *path = getexecname();
int fd = open(path, O_RDONLY);
int fd = open("/proc/self/path/a.out", O_RDONLY);
#elif defined(__HAIKU__)
char path[PATH_MAX];
if (find_path(B_APP_IMAGE_SYMBOL, B_FIND_PATH_IMAGE_PATH,
Expand Down
3 changes: 1 addition & 2 deletions ext/opcache/jit/zend_jit_perf_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ static void zend_jit_perf_jitdump_open(void)
}
fd = open(path, O_RDONLY);
#elif defined(__sun)
const char *path = getexecname();
fd = open(path, O_RDONLY);
fd = open("/proc/self/path/a.out", O_RDONLY);
#elif defined(__HAIKU__)
char path[PATH_MAX];
if (find_path(B_APP_IMAGE_SYMBOL, B_FIND_PATH_IMAGE_PATH,
Expand Down

0 comments on commit d87d2f0

Please sign in to comment.