diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-02 21:08:36 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-02 21:08:36 +0000 |
commit | a26f58c7c394f81c523da597f85f69d3fc8bc8ad (patch) | |
tree | 869e58ba4df84531d550002ccb2a856ed5db2577 /client.c | |
parent | f6b86402c7fd1f4af0e4d163f22e4b9f71b2e538 (diff) |
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.
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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 <nicm@users.sourceforge.net> @@ -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 |