[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#3225: session manager hang due to block on ice_fd (failure to check
From: |
Glenn Morris |
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 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
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.
- bug#3225: session manager hang due to block on ice_fd (failure to check for EINTR in select),
Glenn Morris <=