mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Speed up 'read', fixing macOS hang
This fixes a hanging bug that could occur on macOS when using the 'read' command to read from a FIFO and encountering end-of-file without a final newline character. It also makes the 'read' command perform 15-25% faster on macOS and Linux and maybe other systems. src/lib/libast/sfio/sfpkrd.c: sfpkrd(): - Get rid of the optional stuff that uses the poll(2) or select(2) syscalls. The only thing that is required to avoid regressions is the code that was conditional upon the socket_peek feature test, which tests for the correct functioning of the recv(2) syscall. This has now been made mandatory. The rest now uses what was previously a fallback in plain C, resulting in a function that is not only more readable, but actually faster than the syscalls. Resolves: https://github.com/ksh93/ksh/issues/118
This commit is contained in:
parent
c3388ffd85
commit
ff385e5a89
4 changed files with 40 additions and 232 deletions
5
NEWS
5
NEWS
|
@ -3,6 +3,11 @@ For full details, see the git log at: https://github.com/ksh93/ksh
|
|||
|
||||
Any uppercase BUG_* names are modernish shell bug IDs.
|
||||
|
||||
2020-08-18:
|
||||
|
||||
- Sped up the 'read' command on most systems by 15-25%. Fixed a hanging bug
|
||||
on reading from a FIFO that could occur on macOS.
|
||||
|
||||
2020-08-17:
|
||||
|
||||
- 'command -p' incorrectly used the hash table entry (a.k.a. tracked alias)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue