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

Re: Bug#385976: strange (and annoying) delay on startup



On Mon, Sep 11, 2006, Robert Millan wrote:
> Thanks for the ellaboration.  This sounds like a strange race, though.  It
> would require the user to launch the client before the server has finished its
> startup, which AFAICT can only be done from a shell that doesn't belong to
> this server session.

 I think the race is possible, otherwise there wouldn't be a special
 case for it in the code.  But perhaps it's possible to avoid the race
 at a higher level.

> Is this hack required for the initial X client?  If this is so, waiting 5s is
> not a good solution to workaround lack of syncronisation anyway.

 The 5 second wait is coded in a generic fashion when the underlying
 transport said connection is to be retried.  The problem is not the 5
 second wait, but the fact that the transport said to retry, while it's
 clear that the socket isn't there -- and won't appear.  It's hard to
 tell whether the socket might appear, but I think this question is for
 higher level stacks.

 My opinion is that whoever creates the environment variable which lists
 the socket should make sure the socket is available before spreading
 the news, and we should return to a hard failure when the socket
 doesn't exist.  I think Xtrans preserves errno appropriately to the
 higher level stacks, so it might be enough to check whether errno ==
 ENOENT at a higher level.

-- 
Loïc Minier <lool@dooz.org>



Reply to: