The tmux server can never block

On Mon, May 30, 2011 at 10:05:30AM -0700, Randy Stauner wrote:
>    yeah, my only knowledge of that stuff comes from my experience with
>    perl...
>    i believe perl's system() call does a fork, then in the child an exec()
>    and in the parent a wait() or waitpid() or something along those lines...
>    I'd definitely need to read up on it.
>    I'm sure with other forking going on elsewhere in the server it gets more
>    complicated.
>    On Mon, May 30, 2011 at 7:26 AM, Nicholas Marriott
>    <[1]nicholas.marri...@gmail.com> wrote:
> 
>      this is accurate, if-shell is asynchronous
> 
>      need to fix that sometime but it ain't easy
> 
>      On Sat, May 28, 2011 at 11:59:39AM -0700, Randy Stauner wrote:
>      > ** **I don't know too much about tmux internals but I'm going to take
>      a guess
>      > ** **here:
>      > ** **I think the if-shell command is forking and running
>      asynchronously
>      > ** **and tmux is creating the first window before that command returns
>      and sets
>      > ** **the global option.
>      > ** **Simply setting the option (with -g) does work as expected
>      (without the
>      > ** **if-shell)...
>      > ** **So I tried putting the if-shell line at the very top of my
>      tmux.conf.
>      > ** **I tried doing the same thing with both "set-option -g" and simply
>      > ** **"set-option"...
>      > ** **at first it appeared to work, but on retrying it seemed
>      inconsistent.
>      > ** ** sometimes the first window gets it,
>      > ** **sometimes it doesn't. **a second window usually seems to have it
>      (but not
>      > ** **always...)
>      > ** **I even grep a ps listing to make sure the tmux server is down so
>      that I'm
>      > ** **not getting a cached conf.
>      > ** **I tried putting a "sleep 9;" command in my if-shell and found
>      that my
>      > ** **windows were created as fast as they ever are,
>      > ** **but TERM was set to "screen" (no matter how many windows I
>      created) until
>      > ** **9 seconds had passed.
>      > ** **Then new windows got the new setting.
>      > ** **So it appears that if-shell runs asynchronously even though you
>      may not be
>      > ** **expecting that.
>      > ** **The run-shell command appears to operate the same way.
>      > ** **As a workaround you could put this TERM logic in your bashrc (or
>      > ** **rc/profile for whatever shell you use).
>      > ** **That's where I put it on my pc: I test if the terminfo db
>      supports
>      > ** **screen-256color and then change it.
>      >
>      > ** **I could certainly see it being handy to have a synchronous
>      version of (or
>      > ** **an option for) if-shell...
>      > ** **On Sat, May 28, 2011 at 10:38 AM, qwerty asdfg
>      <[1][2]bollo...@gmail.com>
>      > ** **wrote:
>      >
>      > ** ** **Hello there.
>      > ** ** **I am having issues with the if statements
>      > ** ** **I have a line in my .tmux.conf like this:
>      > ** ** **if '[ -n $DISPLAY ]' 'set -g default-terminal screen-256color'
>      > ** ** **But it only works if I open another window,else the terminal
>      is still
>      > ** ** **screen..Is there any way to fix this?
>      > ** **
>      
> **------------------------------------------------------------------------------
>      > ** ** **vRanger cuts backup time in half-while increasing security.
>      > ** ** **With the market-leading solution for virtual backup and
>      recovery,
>      > ** ** **you get blazing-fast, flexible, and affordable data
>      protection.
>      > ** ** **Download your free trial now.
>      > ** ** **[2][3]http://p.sf.net/sfu/quest-d2dcopy1
>      > ** ** **_______________________________________________
>      > ** ** **tmux-users mailing list
>      > ** ** **[3][4]tmux-users@lists.sourceforge.net
>      > ** ** **[4][5]https://lists.sourceforge.net/lists/listinfo/tmux-users
>      >
>      > References
>      >
>      > ** **Visible links
>      > ** **1. mailto:[6]bollo...@gmail.com
>      > ** **2. [7]http://p.sf.net/sfu/quest-d2dcopy1
>      > ** **3. mailto:[8]tmux-users@lists.sourceforge.net
>      > ** **4. [9]https://lists.sourceforge.net/lists/listinfo/tmux-users
>      >
>      
> ------------------------------------------------------------------------------
>      > vRanger cuts backup time in half-while increasing security.
>      > With the market-leading solution for virtual backup and recovery,
>      > you get blazing-fast, flexible, and affordable data protection.
>      > Download your free trial now.
>      > [10]http://p.sf.net/sfu/quest-d2dcopy1
> 
>      > _______________________________________________
>      > tmux-users mailing list
>      > [11]tmux-users@lists.sourceforge.net
>      > [12]https://lists.sourceforge.net/lists/listinfo/tmux-users
> 
> References
> 
>    Visible links
>    1. mailto:nicholas.marri...@gmail.com
>    2. mailto:bollo...@gmail.com
>    3. http://p.sf.net/sfu/quest-d2dcopy1
>    4. mailto:tmux-users@lists.sourceforge.net
>    5. https://lists.sourceforge.net/lists/listinfo/tmux-users
>    6. mailto:bollo...@gmail.com
>    7. http://p.sf.net/sfu/quest-d2dcopy1
>    8. mailto:tmux-users@lists.sourceforge.net
>    9. https://lists.sourceforge.net/lists/listinfo/tmux-users
>   10. http://p.sf.net/sfu/quest-d2dcopy1
>   11. mailto:tmux-users@lists.sourceforge.net
>   12. https://lists.sourceforge.net/lists/listinfo/tmux-users

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to