Re: is there a way to save stdout and stderr to two bash variables?
From:
Peng Yu
Subject:
Re: is there a way to save stdout and stderr to two bash variables?
Date:
Tue, 12 May 2020 12:52:45 -0500
> You have to turn that memory into a file descriptor. There are a few ways
> to do that: a temp file, a pipe, and mmap-style file mapping (which
> requires a file and file descriptor anyway). The devel branch uses pipes
> if the here document or here string is smaller than the pipe size,
So on Linux, if a string is less than 65,536 byte, pipe is used
instead of a tempfile?
http://man7.org/linux/man-pages/man7/pipe.7.html
Since Linux
2.6.11, the pipe capacity is 16 pages (i.e., 65,536 bytes in a system
with a page size of 4096 bytes).
> and
> a temp file otherwise.
Is the tempfile location affected by environment variables like TMPDIR?
--
Regards,
Peng