On 4/9/19 1:03 AM, pepa65 wrote: > I think Linda's main drive is to seek improvement in how bash works. Now > that lack of memory is in no way a constraint for the vast majority of > situations where bash is commonly used, it would be great if that memory > could be used instead of writing to a file system -- whether a pipe, a > here doc/string does that, or explicitly through redirection. Things > could work without requiring the presence of a file system.
There is no portable way to turn an arbitrary block of memory into a file descriptor. There are mmap-based approaches that can get you most of the way there, but they require a file descriptor to start with. You can always invent some kind of local IPC that uses memory buffers, but the implementation cost of doing that outweighs the benefit. > If temporary files are not created in all cases of here docs/strings, it > would be great if the buffer size that bash allocates could be set. Some systems allow the pipe buffer size to be set, but that's not portable either. > Bash not writing temporary files for here strings & docs would be a > great feature to me. Look at the devel branch. Chet -- ``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/