emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash at startup in Cygwin w32 build on emacs-25 branch


From: Eli Zaretskii
Subject: Re: Crash at startup in Cygwin w32 build on emacs-25 branch
Date: Sat, 28 Nov 2015 10:18:03 +0200

> From: Andy Moreton <address@hidden>
> Date: Fri, 27 Nov 2015 23:44:55 +0000
> 
> > I couldn't imagine Cygwin needs the thread information.
> 
> Only the Cygwin w32 build, which sets HAVE_NTGUI and uses the Windows
> GUI code for display (so no need for an X11 server).

Yes, I know.  But the way the Cygwin w32 build gets input is very
different from the native build.  Threads other than the main one are
used in the native build to receive messages from MS-Windows, in order
to emulate the read-socket hook and some other Posix features (like
interval timers).  AFAIU, Cygwin reads from /dev/windows pseudo-device
using the "normal" Posix reads from a file descriptor.  That's why I
didn't think about Cygwin in this case: I don't think it launches any
non-main threads.

> The module code also uses dwMainThreadId for error checking, and may
> need similar changes for the Cygwin w32 build.

The use of dwMainThreadId in emacs-module.c is guarded by WINDOWSNT,
so is not compiled into the Cygwin w32 build.  I believe the latter
uses pthreads for that.

> It may be safer to provide the thread ID from a function to ensure
> that it has been initialised before callers try to use it.

Not sure what you mean here.  Do you mean use an accessor instead of a
global variable?  If so, I don't understand the rationale.

> > Btw, it's high time you got write access to the repository.  Would you
> > like that?
> 
> That would prbably make sense. What needs to be done to arrange that ?

Get a Savannah account (http://savannah.gnu.org/account/register.php,
I believe), then apply for membership in the Emacs project.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]