I was trying to source a conf file to create default windows,
but it seems that when doing
if-shell "tmux has-session -t auto" "display-message yes"
tmux seems to hang on the "has-session" call if the session does not exist.
I can see these in a ps:
rando 27867 0.0 0.0 1832 496 ? S 08:51 0:00 sh -c tmux
has-session -t auto
rando 27868 0.0 0.0 2968 1072 ? S 08:51 0:00 tmux
has-session -t auto
I think they'll sit there like that forever.
If I kill the child process (27868 in the example) with SIGTERM then,
ironically, my tmux session will display the message.
If I send a SIGKILL I see nothing.
If i run it from my shell (using "tmux if-shell ..." instead of the tmux
command prompt)
my shell will just hang. It won't even respond to SIGINT (Ctrl-C).
I have to switch to another window and kill it.
If the session *does* exist (tmux if-shell "tmux has-session -t 0"
"display-message hi")
it returns immediately and displays the expected message.
I also don't see any problems with has-session without the if-shell.
I have experienced the same thing with the following configurations:
tmux 1.4 and 1.5 from the sourceforge CVS (as of 2011-4-28T16:12:48Z).
Ubuntu 10.04.2 LTS: Linux 2.6.32-31-generic #61-Ubuntu SMP Fri Apr 8
18:24:35 UTC 2011 i686 GNU/Linux
libevent 1.4
tmux 1.4
Debian 5.0.5: Linux 2.6.26-2-686-bigmem #1 SMP Wed Nov 4 21:12:12 UTC 2009
i686 GNU/Linux
libevent 2.0
I've tried it all through the same gui terminal (xfce4-terminal with
TERM=xterm-256color).
Let me know if you'd like any more info or if there's something else I
should try.
Thanks!
- Randy
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users