From: Sam Roberts Date: 2004-03-21T04:19:16+09:00 Subject: Re: Can $LOAD_PATH be relative? Quoteing cez-misc.ruby-talk@necrofish.org.uk, on Sun, Mar 21, 2004 at 03:51:04AM +0900: > > Executables in unix don't have a knowledge of "where they are". They > > don't, in fact, have to "be" anywhere. Some are even built into the boot > > image, so don't in fact have to have ever "been" anywhere. > > Well, on some operating systems it's certainly possible to find the > executable image corresponding to a process (eg: Linux) and on others Even if its been unlinked? How would one do this, exactly, read it from /proc? It would be a handy trick to know. > you can find the device number / inode no. of each text section within > the process. That's pretty cool, I didn't know that. But a (device#,inode#) pair isn't a path, and can be reachable through 0 (if unlinked), 1, or more (if links are present) paths, and wouldn't it be a fairly time consuming process, searching from /, to try and find a path that points to that dev/inod pair?. Its not only about security, its also about predictability. Even if you could find a path, when I choose which of the rubys in my system to use by putting a symlink to the correct version in my ~/bin directory, wouldn't that mean that ruby wouldn't run, when it found that ~/lib/ruby didn't exist? Maybe its a really great idea, but my point is that its not just unix people being stuck in their ways (though we notoriously are :-), it is not obvious how/whether this could be implemented on a unix box. Cheers, Sam