[966] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Re: "Common problems" part of FAQ?
daemon@ATHENA.MIT.EDU (Szekeres Istvan)
Tue Sep 16 10:09:50 1997
Date: Tue, 16 Sep 1997 16:11:15 +0200 (CEST)
From: Szekeres Istvan <szekeres@pc0176sd.sysdata.siemens.at>
Reply-To: Szekeres Istvan <szekeres@pc0176sd.sysdata.siemens.at>
To: gtk-list@redhat.com
In-Reply-To: <199709161346.JAA15365@tristan.redhat.com>
Resent-From: gtk-list@redhat.com
On Tue, 16 Sep 1997, Michael K. Johnson wrote:
> Szekeres Istvan writes:
> >The exit() vs _exit() problem is described in the Unix Programming FAQ.
>
> Oh, I know. That's why I blushed when I realized what was happening;
> I ought to know better. I *do* know better if I think about it. It
> was a cut-n-paste error on my part.
> [snip]
> How can I say this: starting from the answer, the question-answer link
> is painfully obvious. But if someone is asking the question at all,
> the link isn't obvious. What I'm suggesting is those links. So from
> a coding what-ought-I-to-do basis, the Unix FAQ is quite correct. But
> from a debugging I-already-screwed-up point of view, the Unix FAQ on
> this point is worthless -- if I knew to read that answer, I wouldn't
> need to be reading it.
>
> Arbitrary Unix programs with this bug will see it in different ways,
> too. Scrambled data files, arbitrary segfaults in C++ code, random
> other bugs caused by atexit() stuff. But gtk programs, like all X
> programs, are likely to see it in the particular way I mention above.
> And so, since gtk is some people's introduction to X programming, I'm
> suggesting that this particular manifestation of this general bug be
> mentioned.
(At least) this fea^H^H^Hbug can be avoided by a general g_daemon() function
in glib, which implements the fork();[setsid()], _exit() calls. This would
also be useful to avoid #ifdef HAVE_SETSID & co. in non-library code.
Pista
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null