[geeks] Mac definitions

Jonathan Patschke jp at celestrion.net
Fri Jul 8 16:50:47 CDT 2011


On Fri, 8 Jul 2011, Mike Meredith wrote:

> Renaming the binary is perhaps going a little further than normal, but
> frankly Apache is a poor example here. The binary should never have
> been named 'httpd' ... what if you're running different 'httpd's ?

You can always do it the SysV way:
         /opt/*/sbin/httpd

If Unix library-search paths were as sane as Windows[0], this would work a
lot better.  I've pondered before a tool that would edit the executable
header to "firm-code" a path at installation.  It's not relying on ld.so's
configuration, and it's not set by -rpath, but by, say, /usr/bin/install.
That'd require leaving patch space in the executable header for replacing
the library name with up to PATH_MAX characters.


[0] Before COM and all the other registration crap are involved, the
     library search path is very sane.  Libraries are expected to be in the
     directory containing the executable (or in the system directory or the
     user's search path).  COM makes the matter more difficult, because the
     path is hardcoded in the registry, and the new SxS assembly stuff
     makes the process nightmarish.
-- 
Jonathan Patschke |
Elgin, TX         | "He who is contented is rich." -- Lao Tzu
USA               |


More information about the geeks mailing list