Can you please try this diff? It is against OpenBSD -current but should apply
to tmux CVS HEAD as well, if not let me know.
This makes remain-on-exit apply to all panes including if there is only one
left in the window (I know there is no respawn-pane but straightening that kind
of thing out is for later problem as panes become more developed).
Index: server.c
===================================================================
RCS file: /cvs/src/usr.bin/tmux/server.c,v
retrieving revision 1.1
diff -u -p -r1.1 server.c
--- server.c 1 Jun 2009 22:58:49 -0000 1.1
+++ server.c 23 Jun 2009 20:04:51 -0000
@@ -966,7 +966,7 @@ server_check_window_content(
return (1);
}
-/* Check if window still exists.. */
+/* Check if window still exists. */
void
server_check_window(struct window *w)
{
@@ -984,13 +984,18 @@ server_check_window(struct window *w)
wp = TAILQ_FIRST(&w->panes);
while (wp != NULL) {
wq = TAILQ_NEXT(wp, entry);
- if (wp->fd != -1)
- destroyed = 0;
- else if (!flag) {
+ /*
+ * If the pane has died and the remain-on-exit flag is not set,
+ * remove the pane; otherwise, if the flag is set, don't allow
+ * the window to be destroyed (or it'll close when the last
+ * pane dies).
+ */
+ if (wp->fd == -1 && !flag) {
window_remove_pane(w, wp);
server_redraw_window(w);
layout_refresh(w, 0);
- }
+ } else
+ destroyed = 0;
wp = wq;
}
Post by Iain MorganPost by Mike PutnamPost by Iain MorganPost by LEVAI DanielPost by LEVAI DanielPost by Iain MorganGreetings,
With tmux 0.8, I don't seem to be able to get the remain-on-exit
functionality working. I've tried both 'set -g set-remain-on-exit on'
and 'setw -g remain-on-exit.' In both cases, the window disappears when
I exit. The option gets set but doesn't seem to have any affect.
Is this a known issue?
set-option -g set-remain-on-exit
^^ on
of course turning it on would be even more desirable :)
Daniel
--
L?VAI D?niel
PGP key ID = 0x4AC0A4B1
Key fingerprint = D037 03B9 C12D D338 4412 2D83 1373 917A 4AC0 A4B1
------------------------------------------------------------------------------
That was actually the first thing I tried.
--
Iain Morgan
I've reached the same issue. I'm a recent screen convert, so perhaps I'm
expecting screen-esque behavior where the when spawning process exits, that the
tmux window remains as a placeholder, awaiting a kill or respawn command from
me.
Is this the behavior intended by "set -g set-remain-on-exit on" ?
Mike
http://wisconsinlinux.org/
After some experimentation last night, I discovered that remain-on-exit
works for panes rather than for windows. Also, unlike screen's 'zombie'
feature it does not print a message indicating when the process exited.
That information can be very useful at times.
--
Iain Morgan
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users