Re: "Common problems" part of FAQ?




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.

It is certainly a generic Unix programming thing -- it is just one of
those things that there's additional semantics that could be mentioned
in a Gtk context.  In particular, if you get a SIGPIPE on a call to
gtk_show_widget() on a toplevel of some sort, you probably called
exit() instead of _exit().

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.

In any case, it's now mentioned in the list archives, so anyone
searching the archives for a mention of it will find it.  ;-)

michaelkjohnson

"Magazines all too frequently lead to books and should be regarded by the
 prudent as the heavy petting of literature."            -- Fran Lebowitz




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