From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.user Subject: Why launch the Guile signal delivery thread on exit? (was Re: guile 2.0.9 build on mingw) Date: Tue, 18 Jun 2013 17:51:38 -0400 Message-ID: <87li67cck5.fsf_-_@tines.lan> References: <83sj1hv2ml.fsf@gnu.org> <874ndx9y7h.fsf@pobox.com> <83ip2bt4qk.fsf@gnu.org> <8761xqhyyt.fsf@gnu.org> <83li6mt18y.fsf@gnu.org> <83wqq3mcq9.fsf@gnu.org> <87k3m3kor5.fsf@gnu.org> <83ehcalysu.fsf@gnu.org> <87sj0pvl4a.fsf@tines.lan> <837gi1n3v5.fsf@gnu.org> <87k3m1vg8b.fsf@tines.lan> <83txl4lhby.fsf@gnu.org> <87txl4mh5p.fsf@gnu.org> <83a9mvkysg.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1371592346 23839 80.91.229.3 (18 Jun 2013 21:52:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Jun 2013 21:52:26 +0000 (UTC) Cc: guile-user@gnu.org, Ludovic =?utf-8?Q?Court?= =?utf-8?Q?=C3=A8s?= To: Julian Graham Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Jun 18 23:52:25 2013 Return-path: Envelope-to: guile-user@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 1Up3pA-00017q-1o for guile-user@m.gmane.org; Tue, 18 Jun 2013 23:52:24 +0200 Original-Received: from localhost ([::1]:33373 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Up3p9-0000KR-Ox for guile-user@m.gmane.org; Tue, 18 Jun 2013 17:52:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Up3p0-0000Hx-Ll for guile-user@gnu.org; Tue, 18 Jun 2013 17:52:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Up3oy-0004bf-Pj for guile-user@gnu.org; Tue, 18 Jun 2013 17:52:14 -0400 Original-Received: from world.peace.net ([96.39.62.75]:35057) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Up3oy-0004Yf-Lf; Tue, 18 Jun 2013 17:52:12 -0400 Original-Received: from 209-6-92-20.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.92.20] helo=tines.lan) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Up3of-0004l9-7a; Tue, 18 Jun 2013 17:51:53 -0400 In-Reply-To: <83a9mvkysg.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 12 Jun 2013 20:46:07 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 96.39.62.75 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10469 Archived-At: Hi Julian, Could you help us understand some code you added to Guile in 2007? Eli Zaretskii writes: > Why isn't the signal delivery thread launched at program start The signal delivery thread is not launched until the first signal handler is installed. This would seem sensible if not for the fact that it is always launched at exit, which I found surprising. > and why is it launched at exit? Good question. This behavior was apparently introduced in this commit: http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commitdiff;h=2e77f7202b11ad0003831fcff94ec7db80cca015 It appears that Julian Graham may have been the author of these changes. I've CC'd him, hoping that he can shed some light on this. > + /* Ensure the signal handling thread has been launched, because we might be > + shutting it down. */ > + scm_i_ensure_signal_delivery_thread (); Julian, can you remember why you did this? I don't understand the comment above. What does "it" refer to? I would that guess that "it" is the signal handling thread, but how could we be shutting down that thread if it hadn't yet been launched? Regards, Mark