Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 25058f2017f8550c16aa3205635cc32dfd527671
Ticket: 711232ffffffffffffffffffffffffffffffffff
Darwin realpath() and threads problem
User & Date: vasiljevic on 2003-03-28 08:42:15
Changes

  1. assignee changed to: "das"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    The Tcl8.4.x uses the OS-call realpath() to figure-out the
    real physical path of the file on the filesystem, stripped 
    of all "./", "../", constructs, symlinks and alike. 
    
    This function on Darwin uses chdir/fchdir internally
    which changes the process current working directory
    for each invocation. It is called for just about
    *every* path you pass to the Tcl library! Of course, 
    this defeats *any* multithreading code. There is no
    single point like [cd] command which mingles with the
    current dir; *all* path arithmetics eventually call into
    the realpath() and it will swap the current dir under
    your feet. The man page says nothing about this
    important side-effect, though. This is not the case in 
    Solaris and/or Linux OS. It appears to me that it only
    happens on Mac OSX (aka Darwin). 
    
    First corrective measure is to define NO_REALPATH
    variable on compilation time. Of course, in one of my 
    previous threads.
    Better yet is to fix Darwin realpath() to behave better.
    
  4. foundin changed to: "obsolete: 8.4.2"
  5. priority changed to: "9 Immediate"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "vasiljevic"
  9. subsystem changed to: "36. Pathname Management"
  10. title changed to: "Darwin realpath() and threads problem"
  11. type changed to: "Bug"