From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#14569: 24.3.50; bootstrap fails on Cygwin Date: Tue, 11 Jun 2013 11:50:37 -0700 Message-ID: <51B7717D.6060702@cs.ucla.edu> References: <51B5DA82.4010703@alice.it> <3EC77598-24B8-42DD-8983-5069E64AAB60@swipnet.se> <51B62175.10307@alice.it> <06F80BBC-D7CD-4E6C-97AD-EB8E476E2FC0@swipnet.se> <83sj0olh38.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1370976715 27748 80.91.229.3 (11 Jun 2013 18:51:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Jun 2013 18:51:55 +0000 (UTC) Cc: 14569@debbugs.gnu.org, angelo.graziosi@alice.it To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 11 20:51:54 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1UmTfd-0007Rf-Qf for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Jun 2013 20:51:53 +0200 Original-Received: from localhost ([::1]:44892 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmTfd-0007lz-22 for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Jun 2013 14:51:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43398) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmTfX-0007lt-Tl for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2013 14:51:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmTfW-0007GS-T9 for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2013 14:51:47 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52668) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmTfW-0007GM-PO for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2013 14:51:46 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UmTfm-0001CP-Gc for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2013 14:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Jun 2013 18:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14569 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14569-submit@debbugs.gnu.org id=B14569.13709766624507 (code B ref 14569); Tue, 11 Jun 2013 18:52:02 +0000 Original-Received: (at 14569) by debbugs.gnu.org; 11 Jun 2013 18:51:02 +0000 Original-Received: from localhost ([127.0.0.1]:56901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UmTeo-0001Ad-EB for submit@debbugs.gnu.org; Tue, 11 Jun 2013 14:51:02 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:47039) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UmTem-0001A9-JM for 14569@debbugs.gnu.org; Tue, 11 Jun 2013 14:51:01 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id A242139E8105; Tue, 11 Jun 2013 11:50:38 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id itpw+fuEQ4lX; Tue, 11 Jun 2013 11:50:38 -0700 (PDT) Original-Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 1B79E39E8008; Tue, 11 Jun 2013 11:50:38 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 In-Reply-To: <83sj0olh38.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:74977 Archived-At: On 06/11/13 09:58, Eli Zaretskii wrote: > Can you find out (by looking at the glib sources) when and why would > g_spawn_close_pid call 'abort'? It might give us some clues. On POSIX platforms, g_spawn_close_pid does nothing. So apparently glib is compiled for Windows (i.e., glib/gspawn.c is not being compiled, but glib/gspawn-win32.c is being compiled instead. The Emacs code that tickles gnulib is written this way: #if defined HAVE_GLIB && !defined WINDOWSNT /* Tickle glib's child-handling code. Ask glib to wait for Emacs itself; this should always fail, but is enough to initialize glib's private SIGCHLD handler. */ g_source_unref (g_child_watch_source_new (getpid ())); #endif I did notice one problem: the code previously invoked g_child_watch_source_new (0), which is not safe if Emacs has already forked -- perhaps Cygwin was doing that? So I changed it to g_child_watch_source_new (getpid ()) in trunk bzr 112929. Another thought is that there may be a mismatch between glib builds. Since WINDOWSNT is not defined for Cygwin builds, a Cygwin Emacs will call g_child_watch_source_new. My reading of the bleeding-edge glib source code is that a Cygwin glib should call waitpid and mess with the SIGCHLD handler, just as a POSIX glib would, so the above Emacs code is correct. But if you're building under Cygwin and linking with a mingw glib, the above code may well run into problems. Is this a possibility that we should worry about?