209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
|
char procpath[4096];
char exe_buf[4096];
int snprintf_ret;
#endif /* HAVE_READLINK */
#ifdef HAVE_ACCEPTABLE_DLADDR
Dl_info syminfo;
int dladdr_ret;
#endif /*aHAVE_ACCEPTABLE_DLADDR */
#ifdef HAVE_READLINK
if (Tcl_GetNameOfExecutable() == NULL) {
snprintf_ret = snprintf(procpath, sizeof(procpath), "/proc/%lu/exe", (unsigned long) getpid());
if (snprintf_ret < sizeof(procpath)) {
readlink_ret = readlink(procpath, exe_buf, sizeof(exe_buf) - 1);
|
|
|
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
|
char procpath[4096];
char exe_buf[4096];
int snprintf_ret;
#endif /* HAVE_READLINK */
#ifdef HAVE_ACCEPTABLE_DLADDR
Dl_info syminfo;
int dladdr_ret;
#endif /* HAVE_ACCEPTABLE_DLADDR */
#ifdef HAVE_READLINK
if (Tcl_GetNameOfExecutable() == NULL) {
snprintf_ret = snprintf(procpath, sizeof(procpath), "/proc/%lu/exe", (unsigned long) getpid());
if (snprintf_ret < sizeof(procpath)) {
readlink_ret = readlink(procpath, exe_buf, sizeof(exe_buf) - 1);
|