Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2002-02-25
22:24 • Ticket [514392ffff] load failures exit tclsh/wish status still Closed with 7... artifact: ee799141f7 user: das
22:24 • Closed ticket [514392ffff]. artifact: 14ede02b2f user: das
22:22 • Ticket [514392ffff]: 4 changes artifact: 180a7f8e5e user: das
2002-02-07
17:46 • New ticket [514392ffff]. artifact: d44f3abbe0 user: jkbonfield

load failures exit tclsh/wish

Closed / Fixed514392ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 25 years ago
Descriptionplain2002-02-07 17:46:53
"load blah" where blah does not exist causes wish 
(using the native MacOS X build from Jim Ingham) 
to exit.

load libblah.dylib where libblah.dylib does exist in 
DYLD_LIBRARY_PATH, but is not in the current 
directory, also fails in the same manner. Hence 
the user has to know the exact location of the 
library.

The tclLoadDyld.c file contains a function named 
TclpLoadFile. This calls:

    dyld_return = NSAddLibrary(native);

This function never returns - it simply exits the 
process. (I wonder why they bothered to put a 
return value on it!)

Solutions: tricky.... it's possible to fork, load and 
send a message back to the parent.  The parent 
can then use this to decide whether to attempt a 
load.

This only solves one part. We'd still need to try 
searching for the library in all components of 
DYLD_LIBRARY_PATH. (I thought that the nicely 
named NSAddLibraryWithSearching sounded 
useful, but it doesn't seem to make any difference. 
)
dasplain2002-02-25 22:22:37
Logged In: YES 
user_id=90580

an updated version of tclLoadDyld.c using the 10.1 dyld APIs 
is now checked into the HEAD, core-8-3-1-branch and macosx-8-
4-branch.

[load] now gives an error message when a file can't be found/
loaded and also searches DYLD_LIBRARY_PATH
das Closed ticket [514392ffff]. [History diff]2002-02-25 22:24:19
dasplain2002-02-25 22:24:20
Logged In: YES 
user_id=90580
Log in (anonymous is fine) to add a comment.