From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Catch arbitrary signal and throw it later in C Date: Thu, 13 Apr 2023 10:24:31 +0200 Message-ID: References: <7EA1F972-ADC7-4362-9E75-60C481FA8B2D@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38746"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cc: Ruijie Yu , emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 13 10:24:53 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pmsGB-0009pC-QL for ged-emacs-devel@m.gmane-mx.org; Thu, 13 Apr 2023 10:24:51 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmsG0-0001Yt-G9; Thu, 13 Apr 2023 04:24:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmsFw-0001Wb-Q8 for emacs-devel@gnu.org; Thu, 13 Apr 2023 04:24:37 -0400 Original-Received: from smtp-out1.suse.de ([2001:67c:2178:6::1c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pmsFv-0000uY-45 for emacs-devel@gnu.org; Thu, 13 Apr 2023 04:24:36 -0400 Original-Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id D345B218D9; Thu, 13 Apr 2023 08:24:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1681374271; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bwpO5rgFz0/1teji2jn5c84YA5jz7MfTDDC6GEAix2I=; b=ZuqzZESwpKyIFEowGEpeE1Z8TwaQaL5dCDwmAdidelk/dQJz9p1taGLmDTobwoiJKLxG3u 4wt9dPDSGjcVrB5UIY7BnJOhEKXLABN8vaiuojKNLzXcZP+nxhDMk+HArm9hlX5BGwByql QLNHnh4ZapIr3bohGENE8uotQjsR5nc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1681374271; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bwpO5rgFz0/1teji2jn5c84YA5jz7MfTDDC6GEAix2I=; b=JTMvj49HGTRdFLFErY2HOXggOqLNx844rsTLBjc6C1iDMYEEYIpx7v31ysam30UNc/bmFL UCyNVfUpdR1e+dBA== Original-Received: from hawking.suse.de (unknown [10.168.4.11]) by relay2.suse.de (Postfix) with ESMTP id BC07F2C15A; Thu, 13 Apr 2023 08:24:31 +0000 (UTC) Original-Received: by hawking.suse.de (Postfix, from userid 17005) id ACBA44A0367; Thu, 13 Apr 2023 10:24:31 +0200 (CEST) X-Yow: .. I think I'll KILL myself by leaping out of this 14th STORY WINDOW while reading ERICA JONG'S poetry!! In-Reply-To: <7EA1F972-ADC7-4362-9E75-60C481FA8B2D@gmail.com> (Yuan Fu's message of "Thu, 13 Apr 2023 01:12:37 -0700") Received-SPF: pass client-ip=2001:67c:2178:6::1c; envelope-from=schwab@suse.de; helo=smtp-out1.suse.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:305289 Archived-At: The internal counterpart of unwind-protect is record_unwind_protect. It does exactly what you need. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."