diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-09-07 23:59:19 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-09-07 23:59:19 +0000 |
commit | 930f67f4740b2ecca065be653339d5cf51c9a19f (patch) | |
tree | 5e8e6e2bb91cb3d682354bb0bfdbfd399d8e63f5 /tmux.h | |
parent | 1de812d5a8342afc2498c0ef74f4fcbf48907d0b (diff) | |
download | rtmux-930f67f4740b2ecca065be653339d5cf51c9a19f.tar.gz rtmux-930f67f4740b2ecca065be653339d5cf51c9a19f.tar.bz2 rtmux-930f67f4740b2ecca065be653339d5cf51c9a19f.zip |
Sync OpenBSD patchset 320:
Reference count clients and sessions rather than relying on a saved index for
cmd-choose-*.
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.438 2009-09-07 23:48:54 tcunha Exp $ */ +/* $Id: tmux.h,v 1.439 2009-09-07 23:59:19 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -810,11 +810,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 *); @@ -937,6 +940,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; @@ -961,6 +965,8 @@ struct client { struct mode_key_data prompt_mdata; struct session *session; + + int references; }; ARRAY_DECL(clients, struct client *); @@ -1426,6 +1432,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 *); @@ -1700,6 +1707,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); |