Make it build/run on Linux.

This commit is contained in:
Nicholas Marriott
2007-10-31 14:26:26 +00:00
parent 48ad0431fb
commit 08d9f46aae
15 changed files with 1527 additions and 20 deletions

View File

@ -1,4 +1,4 @@
/* $Id: session.c,v 1.27 2007-10-26 16:57:32 nicm Exp $ */
/* $Id: session.c,v 1.28 2007-10-31 14:26:26 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -159,16 +159,16 @@ struct winlink *
session_new(struct session *s, const char *name, const char *cmd, int idx)
{
struct window *w;
const char *environ[] = { NULL, "TERM=screen", NULL };
const char *env[] = { NULL, "TERM=screen", NULL };
char buf[256];
u_int i;
if (session_index(s, &i) != 0)
fatalx("session not found");
xsnprintf(buf, sizeof buf, "TMUX=%ld,%u", (long) getpid(), i);
environ[0] = buf;
env[0] = buf;
if ((w = window_create(name, cmd, environ, s->sx, s->sy)) == NULL)
if ((w = window_create(name, cmd, env, s->sx, s->sy)) == NULL)
return (NULL);
return (session_attach(s, w, idx));
}