version 1.5, 2009/08/13 20:11:58 |
version 1.6, 2009/09/01 13:09:49 |
|
|
#include <sys/types.h> |
#include <sys/types.h> |
#include <sys/time.h> |
#include <sys/time.h> |
|
|
|
#include <paths.h> |
#include <string.h> |
#include <string.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <unistd.h> |
#include <unistd.h> |
|
|
{ |
{ |
struct window *w; |
struct window *w; |
struct environ env; |
struct environ env; |
|
const char *shell; |
u_int hlimit; |
u_int hlimit; |
|
|
environ_init(&env); |
environ_init(&env); |
|
|
environ_copy(&s->environ, &env); |
environ_copy(&s->environ, &env); |
server_fill_environ(s, &env); |
server_fill_environ(s, &env); |
|
|
|
shell = options_get_string(&s->options, "default-shell"); |
|
if (*shell == '\0' || areshell(shell)) |
|
shell = _PATH_BSHELL; |
|
|
hlimit = options_get_number(&s->options, "history-limit"); |
hlimit = options_get_number(&s->options, "history-limit"); |
w = window_create( |
w = window_create( |
name, cmd, cwd, &env, &s->tio, s->sx, s->sy, hlimit, cause); |
name, cmd, shell, cwd, &env, &s->tio, s->sx, s->sy, hlimit, cause); |
if (w == NULL) { |
if (w == NULL) { |
environ_free(&env); |
environ_free(&env); |
return (NULL); |
return (NULL); |