public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: Po Lu via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: Hook for `_exit'
Date: Fri, 05 Aug 2022 16:35:26 +0800	[thread overview]
Message-ID: <87o7wz6qb5.fsf@yahoo.com> (raw)
In-Reply-To: <871qtv2j7w.fsf@oldenburg.str.redhat.com> (Florian Weimer's message of "Fri, 05 Aug 2022 10:22:11 +0200")

Florian Weimer <fweimer@redhat.com> writes:

> I think even if we add the hook in glibc, GTK will find a way to
> terminate the process immediately by other means.

GTK 3 is already in maintenance mode, so I doubt their developers will
deliberately break programs relying on such a hook.  In any case, it
will let us ship a fix for this common problem to our users now, and
negotiate with the GTK developers later should they break it.

> We already have exit, yet GTK deliberately chose not to use it.  So it
> doesn't look like something that can be solved with an in-process
> hook.

[...]

> If you need to use a library with such an approach to error handling,
> but you want to recover from errors, you need to use fork and confine
> its use to a subprocess, and employ some IPC mechanism to maintain
> relevant state in a more persistent process (or keep a redo log in the
> file system).

I guess that would be possible in theory, but it will be difficult to
work with in Emacs.  With that amount of effort, one might as well throw
away GTK altogether and write a Wayland client from scratch.

Thanks.

  reply	other threads:[~2022-08-05  8:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87les389c6.fsf.ref@yahoo.com>
2022-08-05  6:59 ` Po Lu
2022-08-05  8:22   ` Florian Weimer
2022-08-05  8:35     ` Po Lu [this message]
2022-08-05  8:38       ` Florian Weimer
2022-08-05  8:41         ` Po Lu
2022-08-05  8:47           ` Florian Weimer
2022-08-05  8:59             ` Po Lu
2022-08-05  9:02               ` Florian Weimer
2022-08-05  9:55                 ` Cyril Hrubis
2022-08-05 10:52                 ` Po Lu
2022-08-05 17:43                   ` Paul Eggert
2022-08-05 19:20                     ` Szabolcs Nagy
2022-08-05 20:11                       ` Paul Eggert
2022-08-05 22:41                         ` Adhemerval Zanella
2022-08-06  1:37                     ` Po Lu
2022-08-06  8:23                       ` Paul Eggert
2022-08-05 19:17     ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7wz6qb5.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).