=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tmux.c,v retrieving revision 1.10 retrieving revision 1.11 diff -c -r1.10 -r1.11 *** src/usr.bin/tmux/tmux.c 2009/06/25 06:40:25 1.10 --- src/usr.bin/tmux/tmux.c 2009/06/25 06:54:32 1.11 *************** *** 1,4 **** ! /* $OpenBSD: tmux.c,v 1.10 2009/06/25 06:40:25 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tmux.c,v 1.11 2009/06/25 06:54:32 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 371,378 **** &global_options, "default-command", "exec %s -l", shell); if (getcwd(cwd, sizeof cwd) == NULL) { ! log_warn("getcwd"); ! exit(1); } options_set_string(&global_options, "default-path", "%s", cwd); --- 371,381 ---- &global_options, "default-command", "exec %s -l", shell); if (getcwd(cwd, sizeof cwd) == NULL) { ! pw = getpwuid(getuid()); ! if (pw->pw_dir != NULL && *pw->pw_dir != '\0') ! strlcpy(cwd, pw->pw_dir, sizeof cwd); ! else ! strlcpy(cwd, "/", sizeof cwd); } options_set_string(&global_options, "default-path", "%s", cwd);