On 4/17/24 8:55 PM, Martin D Kealey wrote:
On Wed, 17 Apr 2024, Chet Ramey wrote:On 4/16/24 2:46 AM, Carl Edquist wrote:But the shell is pretty slow when you ask it to shovel data around like this. The 'read' builtin, for instance, cautiously does read(2) calls of a single byte at a time.It has to do it that way to find the delimiter on a non-seekable file descriptor, since it has to leave everything it didn't consume available on stdin.Has anyone tried asking any of the kernel teams (Linux, BSD, or other) to add a new system call such as readln() or readd()?
They'd probably point you to an optimized version of getdelim/getline. You're just pushing the work down a layer. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature