Although the explanation for what a server is, is given in the man page,
the argument still holds. The error message just makes you think that there
is something wrong with the connection.

If it's not possible to patch the code, maybe atleast an entry can be added
at the end of the manpage detailing that "Connection Refused" most probably
means sessions are not present.
On Apr 15, 2015 8:14 PM, "Nicholas Marriott" <nicholas.marri...@gmail.com>
wrote:

> Hi
>
> I think the current message is fine.  We describe what is meant by
> "server" in the first few paragraphs of the man page.
>
>
> On Wed, Apr 15, 2015 at 08:06:58PM +0530, Karthik K wrote:
> > ---
> >  client.c | 11 ++++++++---
> >  1 file changed, 8 insertions(+), 3 deletions(-)
> >
> > diff --git a/client.c b/client.c
> > index 8e55640..ea53ca6 100644
> > --- a/client.c
> > +++ b/client.c
> > @@ -252,7 +252,7 @@ client_main(int argc, char **argv, int flags)
> >       if (shell_cmd == NULL && environ_path != NULL &&
> >           (cmdflags & CMD_CANTNEST) &&
> >           strcmp(socket_path, environ_path) == 0) {
> > -             fprintf(stderr, "sessions should be nested with care, "
> > +             fprintf(stderr, "Sessions should be nested with care, "
> >                   "unset $TMUX to force\n");
> >               return (1);
> >       }
> > @@ -260,8 +260,13 @@ client_main(int argc, char **argv, int flags)
> >       /* Initialize the client socket and start the server. */
> >       fd = client_connect(socket_path, cmdflags & CMD_STARTSERVER);
> >       if (fd == -1) {
> > -             fprintf(stderr, "failed to connect to server: %s\n",
> > -                 strerror(errno));
> > +             fprintf(stderr, "Failed to connect to tmux server: ");
> > +        if (errno == 111) { //Most probably no tmux session is present
> > +            fprintf (stderr, "No tmux sessions seem to be running\n");
> > +        }
> > +        else {
> > +            fprintf ("%s\n", strerror(errno));
> > +        }
> >               return (1);
> >       }
> >
> > --
> > 2.3.5
> >
> >
> >
> ------------------------------------------------------------------------------
> > BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> > Develop your own process in accordance with the BPMN 2 standard
> > Learn Process modeling best practices with Bonita BPM through live
> exercises
> > http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual-
> event?utm_
> > source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> > _______________________________________________
> > tmux-users mailing list
> > tmux-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/tmux-users
>
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to