Re: [G2R] Re: Various releases ...



On Thu, 2002-05-09 at 08:43, Michael Meeks wrote:
> [snip]
> 	The problem is this: that we bind Unix Domain Sockets, that create
> /tmp/orbit-foo/linc-fa239876ad78fb type 'files' in /tmp/orbit-foo, and
> that they need cleaning up on program exit.
> 
> 	They also need cleaning up when programs terminate abnormally, but this
> is a less frequent occurrence.
> [snip]

How about using a .fini section in the ORBit library? That way you can
have code run whenever the library is unloaded.

You can do this with either linker flags (e.g. -Wl,-init -Wl,foo_init
-Wl,-fini -Wl,foo_fini), or with GCC attributes to mark a function as
constructor/destructor.

Regards,
Alex.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]