- #include "stdio.h"
- #include "unistd.h"
- int v = readlink("/proc/self/exe", s, sizeof(s));
- if (v != -1) {
- printf("FullPath=%s\n", s);
- }
- }
#include "stdio.h"
#include "unistd.h"
int v = readlink("/proc/self/exe", s, sizeof(s));
if (v != -1) {
printf("FullPath=%s\n", s);
}
}
とすればフルパスが表示される。
0 件のコメント:
コメントを投稿