From a26f58c7c394f81c523da597f85f69d3fc8bc8ad Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 2 Jun 2008 21:08:36 +0000 Subject: Last bits of basic configuration file. By default in ~/.tmux.conf or specified with -f. Just a list of tmux commands executed when the server is started and before and any session/window is created. --- client.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'client.c') diff --git a/client.c b/client.c index 42056faa..59e69875 100644 --- a/client.c +++ b/client.c @@ -1,4 +1,4 @@ -/* $Id: client.c,v 1.27 2008-06-01 21:24:33 nicm Exp $ */ +/* $Id: client.c,v 1.28 2008-06-02 21:08:36 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -45,13 +45,15 @@ client_init(const char *path, struct client_ctx *cctx, int start_server) int mode; u_int retries; struct buffer *b; + pid_t pid; + pid = 0; retries = 0; retry: if (stat(path, &sb) != 0) { if (start_server && errno == ENOENT && retries < 10) { - if (server_start(path) != 0) - return (-1); + if (pid == 0) + pid = server_start(path); usleep(10000); retries++; goto retry; @@ -112,7 +114,7 @@ retry: fail: log_warn("server not found"); - return (-1); + return (1); } int -- cgit