From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Dynamic modules: MODULE_HANDLE_SIGNALS etc. Date: Mon, 4 Jan 2016 07:40:48 -0800 Message-ID: <568A9280.90803@dancol.org> References: <83mvu1x6t3.fsf@gnu.org> <56772054.8010401@cs.ucla.edu> <83zix4scgf.fsf@gnu.org> <5677DBC9.6030307@cs.ucla.edu> <83io3rst2r.fsf@gnu.org> <567841A6.4090408@cs.ucla.edu> <567844B9.2050308@dancol.org> <5678CD07.8080209@cs.ucla.edu> <5678D3AF.7030101@dancol.org> <5678D620.6070000@cs.ucla.edu> <83mvt2qxm1.fsf@gnu.org> <56797CD9.8010706@cs.ucla.edu> <8337uuqsux.fsf@gnu.org> <5679DC83.70405@cs.ucla.edu> <83oadhp2mj.fsf@gnu.org> <567AD556.6020202@cs.ucla.edu> <567AD766.3060608@dancol.org> <567B5DAB.2000900@cs.ucla.edu> <83fuyromig.fsf@gnu.org> <567C25B1.3020101@dancol.org> <56892FD6.8040708@dancol.org> <56894CE7.7090301@cs.ucla.edu> <568950C5.2030306@dancol.org> <56896359.4020309@cs.ucla.edu> <568966D4.5080707@dancol.org> <56898C6F.4010303@cs.ucla.edu> <56898EBD.2000000@dancol.org> <5689AA89.4030404@cs.ucla.edu> <5689AD48.4040902@dancol.org> <8337ud8iec.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pDeKOxiTW99D9bA9JhJDuXlBqkQC0A84x" X-Trace: ger.gmane.org 1451922088 11839 80.91.229.3 (4 Jan 2016 15:41:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Jan 2016 15:41:28 +0000 (UTC) Cc: eggert@cs.ucla.edu, Emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 04 16:41:21 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aG7G3-0006n3-A1 for ged-emacs-devel@m.gmane.org; Mon, 04 Jan 2016 16:41:19 +0100 Original-Received: from localhost ([::1]:45497 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aG7G2-00036B-MU for ged-emacs-devel@m.gmane.org; Mon, 04 Jan 2016 10:41:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aG7Fh-00032u-Na for Emacs-devel@gnu.org; Mon, 04 Jan 2016 10:40:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aG7Fd-0004Zl-MA for Emacs-devel@gnu.org; Mon, 04 Jan 2016 10:40:57 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:46098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aG7Fd-0004Zh-E5; Mon, 04 Jan 2016 10:40:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject; bh=cB/9xFrH4k+PjDm30hrRd8K8ar+84W6NZ5QhzE8XcuI=; b=jf6bcAcLazOUXb9z/XS9S63rsDEUg3LSjJJTvHaDLo1QpyFw1iJ2z3F/6PkPYxZdvJyvlOrBQyfEexXUPB8xP0edZAaOxcrLn/BDDs5gVovxMnIi8/cdsr2k2+hqKG63HbAEFNqrTsemOE0RNHZyOkO2kOpHqwZIFwT1ngfxyfB+oYQdI67boehM0pa8nobMVtku+gLJ1IEOKjbxe5Fk5vvHP5f0dFXRWL9lXTDvbCAk7M8Qb7EIH3nfFtSU2Yc5zNbZNT4gNlnDF/ZGvaWdJ70zZ746WqgqV83y6ES6nbEUx02Gd6D4MDF/YriUg60eRhReQK1csuJPOTVPxrk7pw==; Original-Received: from c-67-161-115-4.hsd1.wa.comcast.net ([67.161.115.4] helo=[192.168.1.210]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1aG7Fc-0004F5-Hn; Mon, 04 Jan 2016 07:40:52 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 In-Reply-To: <8337ud8iec.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:197593 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --pDeKOxiTW99D9bA9JhJDuXlBqkQC0A84x Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 01/04/2016 07:38 AM, Eli Zaretskii wrote: >> From: Daniel Colascione >> Date: Sun, 3 Jan 2016 15:22:48 -0800 >> >> The quick and dirty fix for Fdo_auto_save is to run >> Fdo_auto_save in a forked child >=20 > Forking a child from a damaged parent is likely to leave us with the > same problem in the child. Also, if the original session uses up a > lot of memory, the fork could simply fail. (You later suggested a > vfork + exec, but that doesn't allow auto-saving from the child, > AFAIU.) The idea is that we can wait a bounded amount of time for the child, then kill it if it misbehaves. This way, we at least won't deadlock (although the child might). The reason I suggested vfork is that glibc (the quality of which continues to disappoint me) doesn't provide an async-signal-safe fork. With the scheme I proposed, we don't *need* an async-signal-safe fork, since we can perform the entire emergency save operation inside the signal handler, without invoking lisp. We'd just vfork and exec to ask the user what we want to do, which is an optional process. --pDeKOxiTW99D9bA9JhJDuXlBqkQC0A84x Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJWipKAAAoJEN4WImmbpWBlYgwQAKG9BkLQLrYyuGwEkZFd/l2m /Bm1Krd+xJdNgX5z2V4PD8FOeTKoG+8ez7N8kA230ghIK6XTzAqUNlLScCYwAI9R 7dYPnFpulkNwiml9J5/MdlMoVXzWuolFiS1J8IuMTQSpw46DKYuCJfxTPRrtZlmf 7Q0d56irOJt4lTNBR/7uD/ozqmKbeHEmsVgQxoZS6+8h6L8nSCXIlu42b9/1D+Dp GZrzx7aVF64Kg5HUIrZpNcPDvHuFdmOw0Fn+3BBotVkHf6CDL2h6Iy0u2DiCRkUi xIzsEZgRqwAwrWNXfbuuqg+18ogVGKJCFduByyHrV8A3xtSDWNveZzgEhNQDwm8k MnqsEtyRvSANDlopwfG6EbhbQ0yrFD9Vs9omZX01L6av4RVdM25Vz/vvPEx0Ga8U GDRdjaMfYj9QPpjw7YDQBBeyKXeoJQDlIpFw+axAJ3+9a6/8o533DbgnaUvrkvd3 DVekrIhJ1FpTpnUuEmtC1c4HvTITolso/R5t/L8lo0+jKxcMIu29HXt33p2FIjWf +94Mr6PEauvK/pW3cByY9y7NMkEJZtEYEwmZNRRDuGL2joAbv95u+EFuhVqexuvZ da242NB5UFng2OZ1nNWWDLqF4TzHWI2ItChrDTPjNBVwNjlfI39va29gNh9fvxwO NbxECt0UAHesFd+xYeOX =0ZRN -----END PGP SIGNATURE----- --pDeKOxiTW99D9bA9JhJDuXlBqkQC0A84x--