Skip to content

Screen buffer#58

Open
legionus wants to merge 2 commits into
martanne:masterfrom
legionus:screen-buffer
Open

Screen buffer#58
legionus wants to merge 2 commits into
martanne:masterfrom
legionus:screen-buffer

Conversation

@legionus

@legionus legionus commented Dec 2, 2021

Copy link
Copy Markdown

When a client attaches to an existing session, the session command output is not available to him. The problem is not noticeable when the program (top, man, etc.) in the session is able to redraw its output.

But this does not work with non-interactive utilities. The output of commands in bash will not be available to the client connecting to the session.

To solve this, we add a buffer that contains the last few lines of the session output. When a new client attaches, the contents of this buffer are sent to him.

This PR could address #57, #32 and maybe more.

Fixes: a99e46f ("Simplify I/O handling")
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
When a client attaches to an existing session, the session command
output is not available to him. The problem is not noticeable when the
program (top, man, etc.) in the session is able to redraw its output.

But this does not work with non-interactive utilities. The output of
commands in bash will not be available to the client connecting to the
session.

To solve this, we add a buffer that contains the last few lines of the
session output. When a new client attaches, the contents of this buffer
are sent to him.

Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
@megalithic

Copy link
Copy Markdown

this is brilliant!

any chances of merging @martanne?

@legionus

Copy link
Copy Markdown
Author

@megalithic I haven't seen activity here in years. I maintain my fork.

@megalithic

Copy link
Copy Markdown

@megalithic I haven't seen activity here in years. I maintain my fork.

thanks @legionus! i've switched to building from your repo from source. cheers!

@legionus

Copy link
Copy Markdown
Author

thanks @legionus! i've switched to building from your repo from source. cheers!

@megalithic If you have any other suggestions, I'm ready to add to my fork. I hope in the future I will have a chance to discuss them with upstream.

@littlewing7

Copy link
Copy Markdown

hi @martanne ,

many thanks for you work!
there is a reason this patch cannot be merged on abduco ?

cheers

Max

@Atry

Atry commented Aug 27, 2024

Copy link
Copy Markdown

@martanne What do you think?

@cgm999

cgm999 commented Sep 2, 2025

Copy link
Copy Markdown

@legionus there is another bug which it would be nice if your fork includes
in server.c:
instead of
kill(-server.pid, SIGWINCH);
replace with:
int group_pid;
ioctl(server.pty, TIOCGPGRP, &group_pid);
kill(-group_pid, SIGWINCH);

@legionus

legionus commented Sep 3, 2025

Copy link
Copy Markdown
Author

@legionus there is another bug which it would be nice if your fork includes in server.c: instead of kill(-server.pid, SIGWINCH); replace with: int group_pid; ioctl(server.pty, TIOCGPGRP, &group_pid); kill(-group_pid, SIGWINCH);

@cgm999 Pushed into the next branch.

legionus@7208761

I wonder if this project is dead? I mean, I try not to make changes to the fork in the hope that they will merge someday. If this is not necessary, it is possible to improve the code with modern compilers in mind, add tests, and support for different libc.

@brandon-fryslie

Copy link
Copy Markdown

I think once it hits 10 years without a commit, it’s probably pretty safe to merge any changes you want

@legionus

legionus commented Dec 20, 2025

Copy link
Copy Markdown
Author

Hi! I made a new release to bring together all the changes in this repository and the fixes I've accumulated. Patches and bug reports are welcomed.

#70
https://github.com/legionus/abduco/releases/tag/v0.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants