Re: readlink bug?
Daniel Jour <[email protected]>
| Newsgroups | gmane.lisp.clisp.devel |
|---|---|
| Message-ID | <CACZHyTOc9jY81LF3gf_AHF2J1kAertU5XBhGA++w4-B-ta57Qw@mail.gmail.com> |
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? ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ clisp-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-devel