diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-08-14 21:28:00 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-08-14 21:28:00 +0000 |
commit | 06b3f49c49897558d5692b5f0480107b769be361 (patch) | |
tree | 09365d714d13e45a661cac3da49fd499eac1ee89 /tmux.c | |
parent | 1063e5d0e4abda89934b664a71737a32e278b4e3 (diff) | |
download | rtmux-06b3f49c49897558d5692b5f0480107b769be361.tar.gz rtmux-06b3f49c49897558d5692b5f0480107b769be361.tar.bz2 rtmux-06b3f49c49897558d5692b5f0480107b769be361.zip |
Sync OpenBSD patchset 249:
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.
Diffstat (limited to 'tmux.c')
-rw-r--r-- | tmux.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: tmux.c,v 1.160 2009-08-14 21:04:04 tcunha Exp $ */ +/* $Id: tmux.c,v 1.161 2009-08-14 21:28:00 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -88,8 +88,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); } @@ -193,7 +192,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); |