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



Hi Havoc,

On Thu, 2002-05-09 at 05:01, Havoc Pennington wrote:
> Michael Meeks <michael@ximian.com> writes:
> > 	Well - please propose a solution; I'm all ears.

> I don't even know what the problem is.

	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.

	The process of scanning all files in /tmp/orbit-foo apparently has
serious issues with kernels <= 2.0.X [ according to some commment in the
ORBit 1 source ] and as previously explained is riddled with problems if
each app starting up has to do that.

>  I just know that atexit() by definition does not solve it

	It substantially reduces a rather nasty problem - such that apps that
quit cleanly cleanup after themselves - and yes if you find 10,000
entries now, then remove them first and then try since I added this
relatively recently.

> If you feel like explaining the problem I can try to think of a
> suggestion.

	The best suggestion is to have a single app do something non-blocking
and intelligent with the file handles when the desktop starts - clearly
we'd love to do it when it quits - but there's no way to do that - as
you say, anything that runs at exit might never run.

> The only difference between _exit() and exit() is that _exit() won't
> call atexit() functions (or flush stdio buffers, but who
> cares). Therefore unless libraries install atexit() functions, which
> they should not do, it's fine to call exit() in apps.

	Whatever; the thing is that in this case - you open a load of
resources, which cannot be automatically cleaned by the OS - you demand
that no library have shutdown functions, and you demand that there are
no atexit handlers. You can't have it both ways.

> It's a problem because this has always been a GTK FAQ. People just
> don't expect it. I don't think most programmers have heard of _exit().
> And it's easy to make the issue go away by not using atexit().

	Well - I've never heard it as a Gnome FAQ - I must say, and ORBit
stable has always done this. How often was this question asked before it
was added to the FAQ ?

	Regards,

		Michael.

-- 
 mmeeks@gnu.org  <><, Pseudo Engineer, itinerant idiot




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