From: Michael Albinus <michael.albinus@gmx.de>
To: "Jan Djärv" <jan.h.d@swipnet.se>
Cc: 16519@debbugs.gnu.org
Subject: bug#16519: 24.3.50; gfile notifications not received in batch mode
Date: Fri, 24 Jan 2014 12:23:44 +0100 [thread overview]
Message-ID: <8738kdpqrj.fsf@gmx.de> (raw)
In-Reply-To: <87zjmoz6pd.fsf@gmx.de>
Eli Zaretskii <eliz@gnu.org> writes:
>> File notifications via gfilenotify are not received in batch
>> mode. Likely, the following actions must be taken (quoting Jan Djärv):
>>
>> So just switching to xg_select will not do. You have to explicitly
>> check if in batch mode, then check if GLib has file descriptors we
>> don't know about, and then call xg_select in the main thread.
>
> You will see that I needed to do something very similar for the w32
> build.
Thanks for the pointer.
However, gio's file notifications are not handled by selects, AFAIU. The
events are put into the main context of glib, and must be read by
g_main_context_dispatch.
In the interactive case, this is done by xg_select indeed, but that is
activated by other file descriptors not related to the file
notifications machinery. So we must apply g_main_context_dispatch
somewhere in Emacs' main loop, when we are in noninteractive mode.
I'm not so skilled with the main loop, so I have no idea where to
do. When I add something like this in wait_reading_process_output, I
don't get the file notification events, but an error message:
#if defined (HAVE_GLIB)
if (noninteractive)
{
GMainContext *context;
context = g_main_context_default ();
while (g_main_context_pending (context))
g_main_context_dispatch (context);
}
#endif
The error message is
(file-error "Failed select" "resource temporarily unavailable")
I don't know what to check further :-( Maybe some missing initialization?
Best regards, Michael.
next prev parent reply other threads:[~2014-01-24 11:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-22 9:50 bug#16519: 24.3.50; gfile notifications not received in batch mode Michael Albinus
2014-01-22 15:49 ` Eli Zaretskii
2014-01-24 11:23 ` Michael Albinus [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-02-09 14:35 bug#13662: 24.3.50; inotify-add-watch fails " Chong Yidong
2014-01-17 11:56 ` Michael Albinus
2014-01-25 14:16 ` Eli Zaretskii
2014-01-26 16:09 ` bug#16519: 24.3.50; gfile notifications not received " Michael Albinus
2014-01-26 17:43 ` Michael Albinus
2014-01-27 16:08 ` Michael Albinus
2014-01-29 18:14 ` Eli Zaretskii
2014-01-30 10:03 ` Michael Albinus
2014-01-30 17:03 ` Eli Zaretskii
2014-01-31 14:11 ` Michael Albinus
2014-01-31 15:17 ` Eli Zaretskii
2014-01-31 16:00 ` Michael Albinus
2014-01-31 16:53 ` Eli Zaretskii
2014-02-03 13:31 ` Michael Albinus
2014-02-03 16:13 ` Eli Zaretskii
2014-02-04 11:43 ` Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8738kdpqrj.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=16519@debbugs.gnu.org \
--cc=jan.h.d@swipnet.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.