From: Zoran V. <zv...@ar...> - 2005-10-05 07:53:59
|
Am 04.10.2005 um 23:25 schrieb Stephen Deasey: > Try to commit the thread-safety fixes for nslog seperately, if > possible. We don't want to loose this important fix in the noise of > generic fs changes. OK. > > It looks like Tcl has [file link -sybolic a b]. Will this not replace > ns_symlink? No truncate though, that sucks. TclX has ftruncate... > It has [file link symbolic] but is incompatible with what ns_symlink is doing. Look: lexxsrv:nscp 2> file mkdir /tmp/foo lexxsrv:nscp 3> cd /tmp/foo lexxsrv:nscp 4> exec touch bar lexxsrv:nscp 5> ns_symlink bar barlink lexxsrv:nscp 6> file link -symbolic tcllink bar bar lexxsrv:nscp 7> exec ls -l -rw-rw-rw- 1 root wheel 0 Oct 5 09:40 bar lrwxrwxrwx 1 root wheel 3 Oct 5 09:40 barlink -> bar lrwxrwxrwx 1 root wheel 20 Oct 5 09:42 tcllink -> /private/tmp/ foo/bar You see? Thats why I wrote (tcl/compat.tcl): # # ns_symlink -- # # This is still implement in the server code. The reason is that # the Tcl [file link] command always creates link target with # absolute path to the linked file; nsd/tclfile.c:NsTclSymlinkObjCmd() # > ns_symlink? No truncate though, that sucks. TclX has ftruncate... Well, not only truncate, but: # # ns_truncate -- # # This is still implement in the server code. The reason is that # the Tcl has no portable equivalent; nsd/ tclfile.c:NsTclFTruncateObjCmd() # # # ns_ftruncate -- # # This is still implement in the server code. The reason is that # the Tcl has no portable equivalent; nsd/ tclfile.c:NsTclTruncateObjCmd() # # # ns_mktemp -- # # This is still implement in the server code. The reason is that # the Tcl has no portable equivalent; nsd/ tclfile.c:NsTclMkTempObjCmd() # # # ns_tempnam -- # # This is still implement in the server code. The reason is that # the Tcl has no portable equivalent; nsd/ tclfile.c:NsTclTempNamObjCmd() # I will now checkin the nslog. Then I will tag before-tcl-vfs and then checking the VFS changes. At the moment the VFS changes mean: no direct OS calls related to file-operations. All (most) is done using Tcl wrappers. Exceptions are: temporary filenames, pipes and sockets. Cheers Zoran |