GNU bug report logs - #14569
24.3.50; bootstrap fails on Cygwin

Previous Next

Package: emacs;

Reported by: Katsumi Yamaoka <yamaoka <at> jpl.org>

Date: Fri, 7 Jun 2013 00:17:01 UTC

Severity: important

Found in version 24.3.50

Done: Ken Brown <kbrown <at> cornell.edu>

Bug is archived. No further changes may be made.

Full log


Message #47 received at 14569 <at> debbugs.gnu.org (full text, mbox):

From: Ken Brown <kbrown <at> cornell.edu>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 14569 <at> debbugs.gnu.org,
 angelo.graziosi <at> alice.it
Subject: Re: bug#14569: 24.3.50; bootstrap fails on Cygwin
Date: Tue, 11 Jun 2013 15:26:56 -0400
[Message part 1 (text/plain, inline)]
On 6/11/2013 2:50 PM, Paul Eggert wrote:
> 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.

No, this is not the case.  I just replicated the glib build to make 
sure.  Cygwin is a POSIX platform, to the extent possible.

> 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?

No.  This does not happen.  The Cygwin glib maintainer takes pains to 
patch the source if necessary to make sure that Cygwin is not treated 
like Windows.  See, for instance, the attached patch that is used in the 
Cygwin build.

Ken

[2.32.1-not-win32.patch (text/plain, attachment)]

This bug report was last modified 11 years and 314 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.