Thanks. OpenBSD is locked for release so I'll apply this when it unlocks.
-------- Original message --------
From: Daniel Ralston <dan...@dralston.net>
Date: 27/07/2013 19:53 (GMT+00:00)
To: Nicholas Marriott <nicholas.marri...@gmail.com>
Cc: Thomas Adam <tho...@xteddy.org>,tmux-users@lists.sourceforge.net
Subject: Re: BUG: Crash when killing a session's last window's program from a
grouped session
After applying your patch, I can't reproduce the crash anymore. Looks
like that fixed it.
Thanks!
Daniel
On Sat, Jul 27, 2013 at 11:45 AM, Nicholas Marriott
<nicholas.marri...@gmail.com> wrote:
> Try this please.
>
> The fix is the first part in resize.c to make recalculate_sizes() handle
> an empty window with no active pane. This can happen because the window
> is in two sessions and isn't destroyed immediately when the pane goes
> away but is left until the last session is destroyed. IMO that isn't
> ideal but I don't want to change it all right now - there are lots of
> interdependencies and things are kind of weird. So, for now we just make
> recalculate_sizes() safe.
>
> We also noticed that it looks like grouped sessions are never actually
> freed, so the change in server-fn.c is to hopefully fix that.
>
>
>
> diff --git a/resize.c b/resize.c
> index 5c365df..8d0bd27 100644
> --- a/resize.c
> +++ b/resize.c
> @@ -92,7 +92,7 @@ recalculate_sizes(void)
>
> for (i = 0; i < ARRAY_LENGTH(&windows); i++) {
> w = ARRAY_ITEM(&windows, i);
> - if (w == NULL)
> + if (w == NULL || w->active == NULL)
> continue;
> flag = options_get_number(&w->options, "aggressive-resize");
>
> diff --git a/server-fn.c b/server-fn.c
> index 86e2054..738a61d 100644
> --- a/server-fn.c
> +++ b/server-fn.c
> @@ -398,14 +398,15 @@ void
> server_destroy_session_group(struct session *s)
> {
> struct session_group *sg;
> + struct session *s1;
>
> if ((sg = session_group_find(s)) == NULL)
> server_destroy_session(s);
> else {
> - TAILQ_FOREACH(s, &sg->sessions, gentry)
> + TAILQ_FOREACH_SAFE(s, &sg->sessions, gentry, s1) {
> server_destroy_session(s);
> - TAILQ_REMOVE(&session_groups, sg, entry);
> - free(sg);
> +
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users