Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatible with mtr and possibly other tui programs #134

Open
zu1k opened this issue Aug 16, 2022 · 1 comment
Open

Compatible with mtr and possibly other tui programs #134

zu1k opened this issue Aug 16, 2022 · 1 comment

Comments

@zu1k
Copy link
Owner

zu1k commented Aug 16, 2022

This was previously discussed at #133, we still have some problems with mtr compatibility.

The following content is copied from #133 posted by @mzz2017 :


After the fix PR #132, we found that in different mtr display modes, nali still has exceptions.

To reproduce it, try:

> mtr baidu.com | nali
# and then press d to switch the display mode

At the beginning, we fixed it by scanning control runes (rune<0x20). Although it fixed the most problems, we found there was also some abnormal cursor jitter.

Finally, we think we shouldn't use bufio because it uses cache to delay reads. We should unblock as soon as the write finish on the other side of the pipe ends, and return the read result, process it and print it on the screen, which is what our PR does.


Currently we have the following problems:

@mzz2017
Copy link
Contributor

mzz2017 commented Sep 5, 2022

Additional info: We can see linux pipe size by command ulimit -a. By default, it is 8*512byte=4k.

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

No branches or pull requests

2 participants