Skip to content

Provide follow option to 9p#709

Open
rakoo wants to merge 2 commits into9fans:masterfrom
rakoo:9p-read-follow
Open

Provide follow option to 9p#709
rakoo wants to merge 2 commits into9fans:masterfrom
rakoo:9p-read-follow

Conversation

@rakoo
Copy link
Copy Markdown

@rakoo rakoo commented Apr 10, 2025

This is like tail -f but for 9p read

Requires #708

Comment thread src/cmd/9p.c
}

void
checkout()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not immediately clear to me how this is relevant to the change at hand?

Comment thread src/cmd/9p.c
if(write(1, buf, n) < 0)
sysfatal("write error: %r");
if (n == 0 && follow)
sleep(1000);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably lower this limit substantially. Even better would be somehow poll on this; at first that's what I thought checkout was going to do, but it doesn't.

@yrk-lab
Copy link
Copy Markdown
Contributor

yrk-lab commented Apr 22, 2026

I'd suggest to have a separate 9p tail [-f] rather than cluttering 9p read.

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.

3 participants