From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Interferences between xwidgets and async processes? Date: Sat, 14 Nov 2020 16:43:39 +0100 Message-ID: <87sg9cymdw.fsf@gnus.org> References: <87mu06wyfb.fsf@gnus.org> <83tuuecrl5.fsf@gnu.org> <83v9etaz6z.fsf@gnu.org> <86sg9nsg5a.fsf@akirakyle.com> <87pn4mmybt.fsf@gnus.org> <86h7putm1q.fsf@akirakyle.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="32351"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: JIANG Shaojian , Eli Zaretskii , emacs-devel@gnu.org To: Akira Kyle Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 14 16:44:52 2020 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 1kdxjO-0008JZ-MR for ged-emacs-devel@m.gmane-mx.org; Sat, 14 Nov 2020 16:44:50 +0100 Original-Received: from localhost ([::1]:32900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdxjN-0008Df-P4 for ged-emacs-devel@m.gmane-mx.org; Sat, 14 Nov 2020 10:44:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdxiO-0007b2-0S for emacs-devel@gnu.org; Sat, 14 Nov 2020 10:43:48 -0500 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:33508) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdxiM-0000bC-CV; Sat, 14 Nov 2020 10:43:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Iq32hHODN0+ncmx+hCVhQ/2htFOo/wH0YIhP6gKl/iE=; b=th2PWRb05v1083jGCLVzwzbK+U zElbkpf03x1GO40DkQLgsSFIA5wV4i3HksXJ3gemQvufD2jnscxu/pEJsqzCFMEC5Z2cn2lfwoX0S y2mKxnT8w+FyGD45DYgzZiOxGS1Bl1Ns9sJkPWnLTLDcnjE/jZa+KkaTWb8F078Gci80=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kdxiG-0000Gx-HL; Sat, 14 Nov 2020 16:43:43 +0100 X-Now-Playing: Genesis's _And Then There Were Three_: "Follow You Follow Me" In-Reply-To: <86h7putm1q.fsf@akirakyle.com> (Akira Kyle's message of "Thu, 12 Nov 2020 12:25:21 -0700") Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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.23 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" Xref: news.gmane.io gmane.emacs.devel:259171 Archived-At: Akira Kyle writes: > However since glib 2e471acf breaks all this since glib now may install > its signal handler multiple times instead of just once and will reset > the signal handler to SIG_DFL if it doesn't have any watchers on that > signal. Oh, what a mess. > I'm somewhat surprised this hasn't caused other issues so far, > but I guess Emacs doesn't use glib for any process handling and own > its own gtk isn't spawning any of its own processes on behalf of > Emacs. Yeah, the xwidget code is the only one I can recall doing this stuff. Anybody? > The attached patch fixes this but only in a temporary way. Thanks; applied to Emacs 28. (I counted non-comment lines, and we're still just below the number of lines before we need an FSF copyright assignment. I forget whether I've asked this before -- would you be willing to sign such paperwork, so that future patches can be applied?) > I think that this should ultimately be fixed in glib by making it be a > better signal handling citizen and do what Emacs does by saving any > existing signal handler and call it from its own signal handler. I > suppose I might be able to send them a patch if that seems like the > best course of action here. > > [1] https://gitlab.gnome.org/GNOME/glib/-/issues/733 Yes, I think having a fix on the glib side sounds like the only workeable long-term solution. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no