all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: Yuan Fu <casouri@gmail.com>
Cc: Ruijie Yu <ruijie@netyu.xyz>,  emacs-devel@gnu.org
Subject: Re: Catch arbitrary signal and throw it later in C
Date: Fri, 14 Apr 2023 07:48:55 +0800	[thread overview]
Message-ID: <87wn2fjqc8.fsf@yahoo.com> (raw)
In-Reply-To: <DBE232B8-8681-4793-A51C-5CD8C7E710BB@gmail.com> (Yuan Fu's message of "Thu, 13 Apr 2023 15:18:19 -0700")

Yuan Fu <casouri@gmail.com> writes:

> Thanks, this is very clear and helpful. So the signal routine will
> unwind the pdl and run my cleanup function, right? And if no signal
> happens, my cleanup function is removed from the pdl by unbind_to.

The cleanup function is still run in that case.  If you don't want it to
be run, you have to call:

  clear_unwind_protect (count);

prior to calling `unbind_to'.



  reply	other threads:[~2023-04-13 23:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13  7:24 Catch arbitrary signal and throw it later in C Yuan Fu
2023-04-13  7:33 ` Ruijie Yu via Emacs development discussions.
2023-04-13  8:12   ` Yuan Fu
2023-04-13  8:20     ` Eli Zaretskii
2023-04-13  8:22     ` Po Lu
2023-04-13 22:18       ` Yuan Fu
2023-04-13 23:48         ` Po Lu [this message]
2023-04-13  8:24     ` Andreas Schwab

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=87wn2fjqc8.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=casouri@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=ruijie@netyu.xyz \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.