<i>possible to have an empty info nameofexecutable</i> status still Open with 4 other changes
by
.
D 2011-10-13T17:54:23
J icomment I\salso\slike\sthe\sdladdr()\ssolution,\sthough\sthe\sname\sit\syields\sis\snot\snecessarily\snormalized.\sStill,\sthat's\sa\spractical\ssolution\s(and\swould\sbe\seasy\sto\scheck\sfor\swith\sautoconf).\n\nMy\slittle\stest\scode:\n\n#include\s<dlfcn.h>\n#include\s<stdio.h>\nint\smain(int\sargc,char**argv)\s{\n\s\sDl_info\sinfo;\n\s\sif\s(!dladdr(main,&info))\s{\n\s\s\s\sprintf("not\sfound\\n");\n\s\s\s\sreturn\s1;\n\s\s}\n\s\sprintf("\\"%s\\"\\n",info.dli_fname);\n\s\sreturn\s0;\n}\n
J login dkf
J mimetype text/plain
J username dkf
K 1224888fffffffffffffffffffffffffffffffff
U dkf
Z 794a42ba6dde5a418fd36504c48e6ec3