From: Daniel J. <dan...@gm...> - 2017-03-15 21:26:12
|
Sam wrote: > However, Daniel's point is, IMO, quite solid. The workaround should > be in gnulib, not CLISP sources. We should not have to think about > this. > > Ideally gnulib should provide > > char *gnulib_readlink(char* path); > > which will malloc() it's return value (which the caller will free()). > I don't think the cost of malloc/free is on par with readlink which > requires disk access. Actually there seems to be already a gnulib module providing this: https://www.gnu.org/software/gnulib/MODULES.html#module=areadlink Though I doubt that gnulib is correcting the issues we have with /proc here yet. Above module depends on the readlink module: https://www.gnu.org/software/gnulib/MODULES.html#module=readlink This is correcting possible trailing slashes on Solaris, but does not mention /proc in any way. Perhaps we could add the "fix" (retrying with a bigger buffer) and only include it on specific hosts? Btw, which system is this appearing on? Only in /proc, right? Wouldn't it make more sense to retry with a bigger buffer only when the path is in /proc? |