mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Unify the way sessions are used by callbacks - store the address and use
the reference count, then check it is still on the global sessions list in the callback.
This commit is contained in:
12
session.c
12
session.c
@ -35,6 +35,18 @@ struct session_groups session_groups;
|
||||
struct winlink *session_next_alert(struct winlink *);
|
||||
struct winlink *session_previous_alert(struct winlink *);
|
||||
|
||||
/*
|
||||
* Find if session is still alive. This is true if it is still on the global
|
||||
* sessions list.
|
||||
*/
|
||||
int
|
||||
session_alive(struct session *s)
|
||||
{
|
||||
u_int idx;
|
||||
|
||||
return (session_index(s, &idx) == 0);
|
||||
}
|
||||
|
||||
/* Find session by name. */
|
||||
struct session *
|
||||
session_find(const char *name)
|
||||
|
Reference in New Issue
Block a user