Discussion:
remain-on-exit not working
Iain Morgan
2009-06-10 23:55:29 UTC
Permalink
Greetings,

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?
--
Iain Morgan

PS: This is the main issue that is preventing me from completely
switching from screen to tmux.
LEVAI Daniel
2009-06-11 07:41:19 UTC
Permalink
Post by Iain Morgan
Greetings,
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?
I think the correct config option would be:

set-option -g set-remain-on-exit

(man tmux)

Daniel
--
LÉVAI Dániel
PGP key ID = 0x4AC0A4B1
Key fingerprint = D037 03B9 C12D D338 4412 2D83 1373 917A 4AC0 A4B1
LEVAI Daniel
2009-06-11 07:42:56 UTC
Permalink
Post by LEVAI Daniel
Post by Iain Morgan
Greetings,
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
Iain Morgan
2009-06-11 16:07:32 UTC
Permalink
Post by LEVAI Daniel
Post by LEVAI Daniel
Post by Iain Morgan
Greetings,
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
Mike Putnam
2009-06-11 19:15:51 UTC
Permalink
Post by Iain Morgan
Post by LEVAI Daniel
Post by LEVAI Daniel
Post by Iain Morgan
Greetings,
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/
Iain Morgan
2009-06-17 14:01:31 UTC
Permalink
Post by Mike Putnam
Post by Iain Morgan
Post by LEVAI Daniel
Post by LEVAI Daniel
Post by Iain Morgan
Greetings,
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
Nicholas Marriott
2009-06-23 17:33:10 UTC
Permalink
Hmm. It should work for windows too since you can't have a window without any
panes... I'll have to check see if everything is working as expected.

A message might be nice, I'll add to todo list.
Post by Iain Morgan
Post by Mike Putnam
Post by Iain Morgan
Post by LEVAI Daniel
Post by LEVAI Daniel
Post by Iain Morgan
Greetings,
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
Nicholas Marriott
2009-06-23 20:07:18 UTC
Permalink
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 Morgan
Post by Mike Putnam
Post by Iain Morgan
Post by LEVAI Daniel
Post by LEVAI Daniel
Post by Iain Morgan
Greetings,
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
Iain Morgan
2009-06-23 22:55:29 UTC
Permalink
Hi,

i applied the patch to the current code from CVS and built tmux.
Unfortunately, it seems to have broken tmux. I get back an unresponsive
shell prompt after running 'tmux new.'
Post by Nicholas Marriott
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 Morgan
Post by Mike Putnam
Post by Iain Morgan
Post by LEVAI Daniel
Post by LEVAI Daniel
Post by Iain Morgan
Greetings,
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
--
Iain Morgan
Nicholas Marriott
2009-06-23 17:24:06 UTC
Permalink
The set-remain-on-exit session flag will set the remain-on-exit flag for every
new window created in that session.

remain-on-exit should work but it appears it currently doesn't, probably due to
the pane changes I'll look into it sometime soon.
Post by Mike Putnam
Post by Iain Morgan
Post by LEVAI Daniel
Post by LEVAI Daniel
Post by Iain Morgan
Greetings,
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/
------------------------------------------------------------------------------
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
Continue reading on narkive:
Loading...