=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/client.c,v retrieving revision 1.125 retrieving revision 1.126 diff -c -r1.125 -r1.126 *** src/usr.bin/tmux/client.c 2017/12/19 15:00:39 1.125 --- src/usr.bin/tmux/client.c 2018/01/01 11:19:08 1.126 *************** *** 1,4 **** ! /* $OpenBSD: client.c,v 1.125 2017/12/19 15:00:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: client.c,v 1.126 2018/01/01 11:19:08 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 279,288 **** 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 = ""; --- 279,288 ---- client_peer = proc_add_peer(client_proc, fd, client_dispatch, NULL); /* Save these before pledge(). */ ! if ((cwd = getenv("PWD")) == NULL && ! (cwd = getcwd(path, sizeof path)) == NULL && ! (cwd = find_home()) == NULL) ! cwd = "/"; if ((ttynam = ttyname(STDIN_FILENO)) == NULL) ttynam = "";