.
D 2003-02-01T13:44:10
J assignee vincentdarley
J cmimetype text/plain
J comment Below\sa\stranscript\swhich\sI\scan\snot\sfigure\sout.\s\sAll\sbased\son\sthe\slatest\sCVS,\sFeb\s1.\s\sFYI,\sI\sadded\sa\sdebug\sputs\sto\stclkit's\sboot.tcl,\sshowing\sthe\smount\scommand\sit\ssets\sup\son\sstartup:\n\ntry\s$\smkdir\sfoo\ntry\s$\scd\sfoo/\nfoo\s$\sln\s-s\s../tclkit\sbar\nfoo\s$\scd\s..\ntry\s$\sfoo/bar\s\nvfs::filesystem\smount\s/home/shared/basekit/tclkit/try/foo/bar\s::vfs::mk4::handler\sexe\napplication-specific\sinitialization\sfailed:\sunknown\sencoding\s"iso8859-1"\n%\svfs::filesystem\sinfo\n/home/shared/basekit/tclkit/tclkit\n%\sinfo\snameofexe\n/home/shared/basekit/tclkit/try/foo/bar\n%\spwd\n/home/shared/basekit/tclkit/try\n%\n\nThe\sweird\spart\sis\sthe\soutput\sof\s"vfs::filesystem\sinfo".\s\sThat\spath\swas\show\stclkit\swas\soriginally\sbuilt,\sbut\sI've\smoved\sit\sinside\s"try/",\sso\sit\sdoes\snot\sexist.\s\sNote\sthat\sthe\ssymlink\sis\srelative,\sit\shas\sa\s".."\sin\sit.\s\sThis\sis\sa\stricky\scase.\n\nThere\sseems\sto\sbe\ssomething\shosed,\sI'm\schecking\sinto\sit.\s\sIn\sthe\ssame\scase\sas\sabove\s-\swatch\sthis:\n\ntry\s$\s./tclkit\nvfs::filesystem\smount\s/home/shared/basekit/tclkit/try/tclkit\s::vfs::mk4::handler\sexe\n%\sfile\sreadlink\sfoo/bar\n../tclkit\n%\sfile\ssize\sfoo/bar\n3011296\n%\sopen\sfoo/bar\nfile4\n%\sopen\s[file\sreadlink\sfoo/bar]\ncouldn't\sopen\s"../tclkit":\sno\ssuch\sfile\sor\sdirectory\n\nEverything\sappears\sto\sbe\sok,\sthis\sshows\sthat\sopen\sand\sopen/readlink\sare\snot\sidentical\s(logical,\sthough\sperhaps\snot\sexpected).\s\sExplanation:\sthe\s".."\sin\sthe\ssymlink\swould\sneed\sto\sbe\sresolved\sagainst\sthe\sdir\sin\swhich\sthe\ssymlink\sresides.\n\nNow\scompare\swith\srunning\sthe\ssame\stclkit\sexecutable\sthrough\sa\ssymlink:\n\ntry\s$\sfoo/bar\nvfs::filesystem\smount\s/home/shared/basekit/tclkit/try/foo/bar\s::vfs::mk4::handler\sexe\napplication-specific\sinitialization\sfailed:\sunknown\sencoding\s"iso8859-1"\n%\sfile\sreadlink\sfoo/bar\n../tclkit\n%\sfile\ssize\sfoo/bar\n3011296\n%\sopen\sfoo/bar\nfile4\n%\sseek\sfile4\s0\send\n%\stell\sfile4\n3011296\n%\sopen\s[file\sreadlink\sfoo/bar]\nmk1\n%\sread\smk1\n%\sfile\sstat\sfoo/bar\ssb\n%\sarray\sget\ssb\nmtime\s1044103928\satime\s1044103927\sgid\s100\snlink\s1\smode\s33261\stype\sfile\sctime\s1044103953\suid\s500\sino\s273302\ssize\s3011296\sdev\s778\n%\sseek\smk1\s0\send\nerror\sduring\sseek\son\s"mk1":\sSuccess\n%\stell\smk1\n-1\n%\s\n\nThis\ssecond\scase\sshows\sthat\sthe\soriginal\spath\sstill\slooks\slike\sa\sfile\s(the\stclkit\sexecutable),\sbut\sopening\sthe\sdereferenced\ssymlink\sends\sup\sbeing\sinside\sVFS.\s\sI\sdon't\sunderstand\swhat\sit\sis,\sthe\s"file"\sseems\sto\sbe\sbogus\s(rightly\sso\smaybe,\ssince\sthe\sthing\s*should*\sbe\sa\smountpoint\snow,\si.e.\sa\sdir).\n\nLooks\slike\sa\scouple\sof\sthings\sare\snot\sright.\s\sI'm\snot\ssure\sexactly\s*what*\sthe\scorrect\sresults\sfor\sall\sthese\scases\sshould\sbe,\sbut\swanted\sto\spass\sthis\son.\n\nIt\sall\scame\sabout\swhen\sI\snoticed\sthat\ssymlinked\sstarkits\sdid\snot\smount\sproperly.\s\sI\sstarted\sadding\ssome\scode,\sbut\sit's\sgetting\shairy.\n\nWould\sit\sbe\sbetter\sif\s"file\sreadlink"\sreturned\sa\spath\swhich\swas\sfully\sresolved?\s\sThe\sway\sit\sis\snow,\sit\slooks\slike\stranslating\sa\ssymlink\sto\sthe\sreal\sfile\swill\srequire\ssome\snasty\spath\strickery.\s\sWhat\sI\scan\sthink\sof\sso\sfar\sto\sdeal\swith\srelative\ssymlinks\son\sUnix\sis:\n\s\sset\sf\s[file\sjoin\s[file\sdirname\s$f]\s[file\sreadlink\s$f]]\nYikes...
J foundin None
J priority 5\sMedium
J resolution None
J status Open
J submitter jcw
J subsystem 37.\sFile\sSystem
J title symlinks\sand\smountpoints\s-\sconfused?
J type RFE
K 678662ffffffffffffffffffffffffffffffffff
U jcw
Z 860e603c2ca5bfc68329231c684b05f5