From 9a52ef099a28eb1c80f265d122567a4ccf31ba3a Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 12 Aug 2009 09:14:25 +0000 Subject: When started as the shell, __progname contains a leading -, so hardcode "tmux" for socket path and log files, and strip it when working out the shell. --- tmux.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tmux.c') diff --git a/tmux.c b/tmux.c index 34416e30..65772f92 100644 --- a/tmux.c +++ b/tmux.c @@ -79,8 +79,7 @@ logfile(const char *name) log_close(); if (debug_level > 0) { - xasprintf( - &path, "%s-%s-%ld.log", __progname, name, (long) getpid()); + xasprintf(&path, "tmux-%s-%ld.log", name, (long) getpid()); log_open_file(debug_level, path); xfree(path); } @@ -184,7 +183,7 @@ makesockpath(const char *label) u_int uid; uid = getuid(); - xsnprintf(base, MAXPATHLEN, "%s/%s-%d", _PATH_TMP, __progname, uid); + xsnprintf(base, MAXPATHLEN, "%s/tmux-%d", _PATH_TMP, uid); if (mkdir(base, S_IRWXU) != 0 && errno != EEXIST) return (NULL); -- cgit