emacs-devel
[Top][All Lists]
Advanced

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

Re: Using glib's g_file_monitor_file and g_file_monitor_directory


From: Michael Albinus
Subject: Re: Using glib's g_file_monitor_file and g_file_monitor_directory
Date: Mon, 03 Jun 2013 15:21:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

Hi Eli,

> First, I guess you tested this in a build that was linked against glib
> regardless of gfilenotify.c.  Otherwise, I don't understand how it
> compiled and linked for you under --with-file-notification=gfile,
> because the compiler and linker flags reported by pkg-config for glib
> were not propagated to src/Makefile.  The first 2 hunks below fix
> that.  I don't think this is specific to w32, but feel free to point
> out what I missed.

Under GNU/Linux, there are no additional cflags needed, so I didn't miss
them :-)

> When I used --with-file-notification=gfile, Emacs built OK, but
> crashed in the bowels of glib the moment auto-revert-mode called the
> glib monitor.  I post the backtrace below, for the record.  The glib
> libraries I installed were stripped, so I couldn't step through their
> code on the source level.  However, by comparing the disassembly with
> the source code, I concluded that it crashes here:
>
>   void
>   _g_io_modules_ensure_extension_points_registered (void)
>   {
>     static gboolean registered_extensions = FALSE;
>     GIOExtensionPoint *ep;
>
>     G_LOCK (registered_extensions);   <<<<<<<<<<<<<<<<<<<<<<

G_LOCK is a macro in gthread.h. I don't know, how multithreading of glib
works on MS Windows.

> So I guess we won't be recommending glib file notifications to Emacs
> users on Windows just yet ;-)

Yep. Maybe it is worth to be mentioned in etc/PROBLEMS. Would be
interesting to know how it behaves under cygwin, or osx.

> Perhaps someone who knows more about glib on Windows will be able to
> explain the crash and suggest a solution.

At least it would be great to find a test for configure.ac, that we can
kick off glib on Windows in case.

> Finally, here are the changes I suggest on top of yours:

Thanks, works fine here. I have applied my patch to the trunk. You could
apply your patch on top of it (or tell me to do it for you).

I will to add some few lines to etc/NEWS and to the doc. Afterwards, we
could start to think how a general file notifications interface shall
look like.

Best regards, Michael.



reply via email to

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