From: James B. <jk...@mr...> - 2002-03-01 18:12:07
|
OK, in a follow up to my own findings, I now see that there's still a few other tcl problems (and perhaps system problems) involving environment variables. The first is that exec seems to clear all of them. Eg try "exec zsh" and then printenv. I can get this to work in a test C application using NSGetEnviron and execl, so it looks like it's a tcl specific bug. The second is that although setting environment variables does appear to work correctly changing the value of DYLD_LIBRARY_PATH appears to have no effect. I've tried changing PATH by using "exec prog", set env(PATH), and then exec prog once more. This demonstrates that the environment really is being set correctly. However I can't get "load" to work by changing DYLD_LIBRARY_PATH within wish. If I change it outside of wish (in zsh say) then load within subsequent wishes works fine (thus demonstrating that the recent patch to fix this works fine - cheers). I can't see any mention of DYLD_LIBRARY_PATH in tcl, so does this imply that the NSAddImage function uses a copy of DYLD_LIBRARY_PATH inherited at application startup and not the copy found in the current environment variable? I'm not sure how much further I can go with my changes to this code as I'm a complete Mac newbie really. I'm still finding it virtually impossible to find documentation. Anyone know where _NSGetEnviron is documented? I did a systemwide grep and failed to find it. Google finds little else other than the tcl source itself. Come on Apple! Either gives us docs or the source for the libraries themselves. Please? (This is no reflection on you Jim - you've done a stirling job and I thank both you and Apple for allowing you the time and resources. Thanks.) James -- James Bonfield (jk...@mr...) Fax: (+44) 01223 213556 Medical Research Council - Laboratory of Molecular Biology, Hills Road, Cambridge, CB2 2QH, England. Also see Staden Package WWW site at http://www.mrc-lmb.cam.ac.uk/pubseq/ |