=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/client.c,v retrieving revision 1.101 retrieving revision 1.102 diff -c -r1.101 -r1.102 *** src/usr.bin/tmux/client.c 2015/10/28 09:51:55 1.101 --- src/usr.bin/tmux/client.c 2015/10/31 08:13:58 1.102 *************** *** 1,4 **** ! /* $OpenBSD: client.c,v 1.101 2015/10/28 09:51:55 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: client.c,v 1.102 2015/10/31 08:13:58 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 273,280 **** client_peer = proc_add_peer(client_proc, fd, client_dispatch, NULL); /* Save these before pledge(). */ ! if ((cwd = getcwd(path, sizeof path)) == NULL) ! cwd = "/"; if ((ttynam = ttyname(STDIN_FILENO)) == NULL) ttynam = ""; --- 273,282 ---- client_peer = proc_add_peer(client_proc, fd, client_dispatch, NULL); /* Save these before pledge(). */ ! if ((cwd = getcwd(path, sizeof path)) == NULL) { ! if ((cwd = find_home()) == NULL) ! cwd = "/"; ! } if ((ttynam = ttyname(STDIN_FILENO)) == NULL) ttynam = "";