[MUD-Dev] Re: Real-world skills

J C Lawrence claw at kanga.nu
Wed Jul 25 08:04:33 CEST 2001


On Tue, 24 Jul 2001 18:32:03 -0700 
Caliban Tiresias Darklock <caliban at darklock.com> wrote:
> On Tue, 24 Jul 2001 17:09:04 -0700, J C Lawrence <claw at 2wire.com>
> wrote:

>> <<I've always rather liked the way that MS has rephrased the
>> language such that its a "Windows platform" and everything else
>> is an "OS" or "system".  So delightfully fuzzy.>>

> Marketing. 

Which was the point.

> And technically, Windows *isn't* an O/S. It's an O/S plus...

Which illuminates one of the more common FAQs on Linux lists:

  I've got Linux N, what do I click on to do Y?

Shortly followed by the general assumption that to do something to a
machine you have to put your body physically in front of it.  

  Truth is that I have to go put my body in front of Kanga.Nu, but
  that's due to x86 boxes not having a decent external console
  facility which works down into the BIOS/prom layers, not Linux.
  There are times I get really sick of Intel stupidity.

>> Given care in managing/handling your symbol table dependencies
>> (its a questions of clean graph disjoints) under *nix you can use
>> the dlopen () and dlclose() calls to arbitrarily load/remove/swap
>> shared objects.

> I've never worked with shared objects on UNIX, so I'm a little
> surprised it's this easily mapped. 

The uncharitable would suggest taht MS had to copy the ideas from
somewhere and *nix lucked out.  More simply there really aren't too
many ways to handle the problem.  You're doing dynamic linking, so
therefore you have to resolve entry points and references.  Its then
pretty obvious that if you clean up all the links you could swap the
object in and out freely, and that if there were dangling links,
doing much of anything to the object would likely cause a bad
problem later were that link referenced.

> Sounds roughly the same as working with Windows DLL resources,
> so...

>From the dlopen(9) man page, visible here:

  http://www.kanga.nu/cgi-bin/man.cgi?topic=dlopen&section=all
  
--<cut>--
  dlclose decrements the reference count on the dynamic library
  handle handle.  If the reference count drops to zero and no other
  loaded libraries use symbols in it, then the dynamic library is
  unloaded.  If the dynamic library exports a routine named _fini,
  then that routine is called just before the library is unloaded.
--<cut>--

> It looks like this approach would work almost identically in UNIX,
> and could even be handled with an extra C++ file that
> appropriately implemented those four API calls in UNIX terms.

Quite possibly.  

--
J C Lawrence                                    )\._.,--....,'``.	    
---------(*)                                   /,   _.. \   _\  ;`._ ,.
claw at kanga.nu                                 `._.-(,_..'--(,_..'`-.;.'
http://www.kanga.nu/~claw/                     Oh Freddled Gruntbuggly
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list