summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-09-07 21:01:51 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-09-07 21:01:51 +0000
commit6347ae1b8c27e6d1e8aed4018e7dfc9017cf477b (patch)
treeaa27d40b77e3f0e9cb14df5111f38bf7b765b815 /usr.bin/tmux/tmux.h
parent211fbc439442169315739837a03a8a12528f1b10 (diff)
Reference count clients and sessions rather than relying on a saved index for
cmd-choose-*.
Diffstat (limited to 'usr.bin/tmux/tmux.h')
-rw-r--r--usr.bin/tmux/tmux.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index 4bbc4751c18..8d4b10cc85d 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.100 2009/09/07 18:50:45 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.101 2009/09/07 21:01:50 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -812,11 +812,14 @@ struct session {
SLIST_HEAD(, session_alert) alerts;
#define SESSION_UNATTACHED 0x1 /* not attached to any clients */
+#define SESSION_DEAD 0x2
int flags;
struct termios tio;
struct environ environ;
+
+ int references;
};
ARRAY_DECL(sessions, struct session *);
@@ -939,6 +942,7 @@ struct client {
#define CLIENT_SUSPENDED 0x40
#define CLIENT_BAD 0x80
#define CLIENT_IDENTIFY 0x100
+#define CLIENT_DEAD 0x200
int flags;
struct timeval identify_timer;
@@ -963,6 +967,8 @@ struct client {
struct mode_key_data prompt_mdata;
struct session *session;
+
+ int references;
};
ARRAY_DECL(clients, struct client *);
@@ -1428,6 +1434,7 @@ const char *key_string_lookup_key(int);
/* server.c */
extern struct clients clients;
+extern struct clients dead_clients;
int server_client_index(struct client *);
int server_start(char *);
@@ -1702,6 +1709,7 @@ char *default_window_name(struct window *);
/* session.c */
extern struct sessions sessions;
+extern struct sessions dead_sessions;
void session_alert_add(struct session *, struct window *, int);
void session_alert_cancel(struct session *, struct winlink *);
int session_alert_has(struct session *, struct winlink *, int);