119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
-
+
|
goto gotName;
}
ckfree(buf);
buf = NULL;
}
#endif /* __APPLE__ */
#if !defined(__APPLE__) && !defined(DJGPP) && 0
#if !defined(__APPLE__) && !defined(DJGPP)
pid = getpid();
for (i=0 ; i<sizeof(exepaths)/sizeof(*exepaths) ; i++) {
sprintf(buf2, exepaths[i], pid);
readlink_res = readlink(buf2, buf1, PATH_MAX);
if (readlink_res > 0 && buf1[0] == '/') {
buf1[readlink_res] = '\0';
name = buf1;
|