diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-12 14:46:48 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-12 14:46:48 +0000 |
commit | 37f17a7e5b42156a325f2f3207610455cb004ad0 (patch) | |
tree | 5ba7b4a68cbc48e8d8a904fc0e4b35582615fca1 /server-msg.c | |
parent | 514d6fa1ec60563318c67806334c3b8d97c95b02 (diff) |
Warn and bork on nested sessions ($TMUX exists).
Diffstat (limited to 'server-msg.c')
-rw-r--r-- | server-msg.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/server-msg.c b/server-msg.c index 41f4aa63..6fa574c8 100644 --- a/server-msg.c +++ b/server-msg.c @@ -1,4 +1,4 @@ -/* $Id: server-msg.c,v 1.25 2007-10-04 22:04:01 nicm Exp $ */ +/* $Id: server-msg.c,v 1.26 2007-10-12 14:46:48 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -123,6 +123,12 @@ server_msg_fn_command(struct hdr *hdr, struct client *c) ctx.client = c; ctx.flags = 0; + if (data.sid.pid != -1 && (cmd->entry->flags & CMD_CANTNEST)) { + server_msg_fn_command_error(&ctx, "sessions should be nested " + "with care. unset $TMUX and retry to force"); + return (0); + } + if (cmd->entry->flags & CMD_NOSESSION) ctx.session = NULL; else { |