yangsong8-a1 opened a new pull request, #21158:
URL: https://github.com/apache/nuttx/pull/21158
## Summary
pty_write() performed OPOST output one byte at a time, issuing a
separate file_write() to the sink pipe for every character. Use
memchr to locate the next byte that needs translation or that is a
tty control character, then write the run of ordinary bytes before
it to the sink in a single call.
## Impact
Much fewer pipe writes for PTY output. Return value now is the
correct byte count.
## Testing
use adb shell do the following test:
CR/LF : Input is normal; output is complete, with proper line breaks.
```
ap> ls -lR
/:
dr-xr-xr-x 0 0 0 0 audio_image/
dr-xr-xr-x 0 0 0 0 cp_image/
drwxrwxrwx 0 0 0 0 data/
drwxrwxrwx 1 0 0 0 dev/
dr-xr-xr-x 0 0 0 0 etc/
...
```
Ctrl-C / Ctrl-Z:
```
ap> ping -c 1000 127.0.0.1
```
Press Ctrl-C while `ping` is running: `ping` stops immediately.
Run it again; press Ctrl-Z, then use `ps` to verify that it is in the
"stopped" state.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]