That change seems to work.

On Wed, Jun 4, 2014 at 4:43 AM, Nicholas Marriott <
nicholas.marri...@gmail.com> wrote:

> Mark please see if doing this fixes your problem.
>
> diff --git a/client.c b/client.c
> index 0c9f9cb..6172d26 100644
> --- a/client.c
> +++ b/client.c
> @@ -110,7 +110,7 @@ retry:
>                 fatal("socket failed");
>
>         if (connect(fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) == -1) {
> -               if (errno != ECONNREFUSED && errno != ENOENT)
> +               if (errno != ECONNREFUSED && errno != ENOENT && errno != 0)
>                         goto failed;
>                 if (!start_server)
>                         goto failed;
>
>
>
> On Wed, Jun 04, 2014 at 10:41:06AM +0100, Nicholas Marriott wrote:
> > So I guess this is a Cgywin bug. For now you can probably just add "&&
> > errno != 0" to the if after the connect until they fix it.
> >
> >
> >
> > On Tue, Jun 03, 2014 at 09:47:34AM +0100, Balazs Kezes wrote:
> > > [+tmux-users]
> > >
> > > On 2014-06-03 09:06 +0200, Michael Wild wrote:
> > > > Also, refer to https://cygwin.com/ml/cygwin/2014-06/msg00008.html.
> > > > Perhaps this helps you tracking down what exactly triggers this
> > > > behaviour.
> > >
> > > That post has the following fragment:
> > >
> > > > > Here's the strace I got:
> > > > > cygwin-1.7.30-1:
> > > > >    96 1063224 [main] tmux 4072 cygwin_connect: -1 = connect(5,
> > > > > 0x229780, 24), errno 0
> > > > > cygwin-1.7.29-2:
> > > > >    92 1054064 [main] tmux 3548 cygwin_connect: -1 = connect(5,
> > > > > 0x229780, 24), errno 111
> > >
> > > So this means errno handling has changed in cygwin. Btw, errno 111
> means
> > > ECONNREFUSED. In tmux's client_connect() in client.c you have this
> > > fragment:
> > >
> > >     ...
> > >     if (connect(fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) == -1) {
> > >             if (errno != ECONNREFUSED && errno != ENOENT)
> > >                     goto failed;
> > >     ...
> > >
> > > This does mean tmux does things differently based on the errno value. I
> > > don't have much time right now to play around with this but maybe you
> > > could look into cygwin in the meantime?
> > >
> > > --
> > > Balazs
> > >
> > >
> ------------------------------------------------------------------------------
> > > Learn Graph Databases - Download FREE O'Reilly Book
> > > "Graph Databases" is the definitive new guide to graph databases and
> their
> > > applications. Written by three acclaimed leaders in the field,
> > > this first edition is now available. Download your free book today!
> > > http://p.sf.net/sfu/NeoTech
> > > _______________________________________________
> > > tmux-users mailing list
> > > tmux-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/tmux-users
>



-- 
R. Mark Volkmann
Object Computing, Inc.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to