From: Glenn Morris <rgm@gnu.org>
To: Karl Tomlinson <bugs+emacs@karlt.net>
Cc: 3225@debbugs.gnu.org
Subject: bug#3225: session manager hang due to block on ice_fd (failure to check for EINTR in select)
Date: Wed, 05 Oct 2011 15:02:18 -0400 [thread overview]
Message-ID: <n1aa9fxnwl.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <87prenqn7i.fsf@karlt.net> (Karl Tomlinson's message of "Wed, 06 May 2009 09:00:49 +1200")
Karl Tomlinson wrote:
> x_session_check_input in xmsfns.c has this code:
>
> if (select (ice_fd+1, &read_fds,
> (SELECT_TYPE *)0, (SELECT_TYPE *)0, &tmout) < 0)
> {
> ice_fd = -1;
> return 0;
> }
>
> So ice_fd is set to -1 when select returns due to a signal
> (with errno == EINTR). This leaves the fd open but prevents
> further processing.
>
> ksmserver then blocks on this connection and so other apps opening
> an ICE connection also block during start-up.
>
> The simple solution that I have tested is to only set ice_fd to -1
> when errno != EINTR. x_session_check_input can still return early
> in this situation as it will be called again in the future.
>
> (Perhaps ice_fd never needs to be set to -1 here. I don't know if
> there is ever a good reason why is should be set to -1.)
>
>
> In GNU Emacs 22.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.12.11)
> of 2009-01-16 on blackhawk
Sorry for the delay. Is this still an issue? The current code does not
look like that.
next prev parent reply other threads:[~2011-10-05 19:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-05 21:00 bug#3225: session manager hang due to block on ice_fd (failure to check for EINTR in select) Karl Tomlinson
2011-10-05 19:02 ` Glenn Morris [this message]
2011-10-05 23:54 ` Karl Tomlinson
2011-10-06 6:08 ` Jan D.
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=n1aa9fxnwl.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=3225@debbugs.gnu.org \
--cc=bugs+emacs@karlt.net \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).