Comments (4)
Yep. Right here: https://github.com/andfoy/winpty-rs/blob/3b08c65244630fb5c1b7772b0295f317e92e98b9/src/pty/base.rs#L444-L454
encode_wide
does not add a null terminator, but you are calling WideCharToMultiByte
with -1
which tells it to treat it as a null terminated string. Undefined Behavior! as the Rust books like to proclaim. 😝
EDIT: But you did manually add a null terminator, so that's not the issue... time to keep digging...
EDIT 2: So actually caused by writing the nul byte through to the PTY. I will send a PR.
from pywinpty.
The fix was merged. Thanks @andfoy. But winpty-rs and this module still need to be released for the fix to be picked up. (Just an FYI in case anyone hits this).
P.S. This module seems to have not committed the Cargo.lock which means it will build with whatever happens to be the latest matching versions of winpty-rs and other libraries. I think this is a case where you should commit the Cargo.lock for reproducible builds (As this is a cdylib case), just remember to update it when needed.
from pywinpty.
@andfoy is the maintainer of this project as well (as you can see in the commit history).
from pywinpty.
@andfoy is the maintainer of this project as well (as you can see in the commit history).
Yeah. I know. It's up to him when to make a new release of this.
from pywinpty.
Related Issues (20)
- Release v2.0.3
- ConPTY is not fully working in CI HOT 4
- Build failure on windows py3.6 HOT 1
- Release v2.0.4
- Release v2.0.5
- Async read?
- Release v2.0.6
- Release v2.0.7
- Garbled output on Telnet Client HOT 10
- Release v2.0.8
- Failed to install with python 3.11 HOT 2
- 'Pty is closed.' BUG
- Release v2.0.10
- ssh connection establish failed.
- How do I get the same functionality as pty.spawn? HOT 6
- [Question] Messed up display buffer after resize? HOT 2
- Question: Does `PTY.write()` take in unicode string or bytes?
- PtyProcess.spawn cwd parameter not working HOT 4
- Freeze on process.iseof() HOT 7
- Problem calling an executable with full path HOT 3
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 pywinpty.