tmux control mode vs. capture-pane

32 views
Skip to first unread message

hiro

unread,
Jan 13, 2024, 9:02:30 AM1/13/24
to tmux-...@googlegroups.com
Hello,

i have read the man page and this wiki page on the topic:

https://github.com/tmux/tmux/wiki/Control-Mode

my question is: how can i synchronize capture-pane output and tmux -C
output so that i can deliver to clients the full history and then keep
in sync afterwards.

i see a race where if i run catpure-pane too early i might miss (in
the simplest case without escape characters) some lines of text
output. if i run it too late i might get duplicated lines.

to remedy this i beleive i would need a synchronisation method on the
tmux -C attach, which should block all output until capture-pane has
finished. i tried sending pause commands, but they have to be sent
once per pane apparently, and there's still a race between attach and
the pause commands.

also, generally, i see no good way to have any kind of buffer size
control. i'm thinking if i transfer tmux -C output over pipes and tcp
sockets and what have you, it would be good to have a kind of tmux
layer windowsize. and one way to fix my tangential problem above would
be to set this windowsize to zero by default and then to a bigger
number when i'm done synchronizing via capture-pane.

I hope I'm missing something here, please tell me if I misunderstood
bec. else i don't understand how iterm2 can possibly work as it does.
Or has this race just never been observed by anybody?

Greetings,
hiro

Nicholas Marriott

unread,
Jan 15, 2024, 2:24:16 AM1/15/24
to hiro, tmux-users
Hi

I'm not sure what you are asking here.

How can more output be processed before capture-pane has finished?

Control mode flow control is described here: https://github.com/tmux/tmux/wiki/Control-Mode#flow-control


--
You received this message because you are subscribed to the Google Groups "tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tmux-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/CAFSF3XO-49ydHp%3D4ryMKqzOWF3Fh_AJ%2BjdW0S9wfdQ%3DKP_Vnrg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages