Comments (3)
The difference would appear to be in client.go:/func.*Start
2023/08/02 05:16:48 CPU:start
2023/08/02 05:16:48 CPU:client:c.session.RequestPty("ansi", 87, 157, map[0x35:0x0 0x80:0x3840 0x81:0x3840]
2023/08/02 05:16:48 CPU:client:call session.Start(-port9p=45715 'echo' 'hello')
When executed from a terminal, the cpu
client has a pty. So this block is the underlying cause of the presence of the \r
.
if c.hasTTY {
verbose("c.session.RequestPty(\"ansi\", %v, %v, %#x", c.Row, c.Col, modes)
if err := c.session.RequestPty("ansi", c.Row, c.Col, modes); err != nil {
return fmt.Errorf("request for pseudo terminal failed: %v", err)
}
}
Hypothesis: modes
needs adjustment?
from cpu.
Aside: why does:
func verbose(f string, a ...interface{}) {
v("CPU:"+f+"\r\n", a...)
}
append a \r
to every log message?
from cpu.
I hypothesize that this happens because of how gliderlabs/ssh
forces the insertion of \r\n
when the ssh client requested a pty. I think gliderlabs/ssh#210 (as is included in Tailscale's tailscale/tailscale#4154) would probably fix this issue.
Seems like cpu
could use https://github.com/charmbracelet/ssh to fix this bug. I'll try this and update the bug.
from cpu.
Related Issues (20)
- Newbie questions and feature requests HOT 3
- cpu command does not work in non-interactive environment HOT 1
- crash on IO copy HOT 1
- `cpud` command hang when `dsEnabled` is false HOT 2
- doc.go's out of date
- private key inline
- cmd/cpud doesn't build on osx HOT 1
- Update README HOT 1
- running dbench fails on cpu due to unimplemented functions HOT 1
- makefile fails on missing gox command HOT 1
- Missing move, check on lock
- forward p9p services into remote
- Missing much of /etc in Docker cpud? HOT 2
- opportunities to improve cpu performance? HOT 2
- No file locking complicates running some programs from cpu HOT 2
- premature column wrapping HOT 2
- invalid use of WriteAt on file opened with O_APPEND HOT 3
- cpud shouldn't take -key HOT 1
- cpud did not connect for more than 100ms HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpu.