mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-16 00:28:10 +02:00
Make it build/run on Linux.
This commit is contained in:
@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user