On Tue, Apr 9, 2019 at 10:01 PM Jason A. Donenfeld <ja...@zx2c4.com> wrote: > A real solution for this issue involves getting rid of the temporary file > all together. Since we're talking about a bash string, it's already in > memory. Why not just fork() if the write() will block? A simple way would be > to always fork(). A fancy way would be to set NONBLOCK mode, see if it > returns EAGAIN, and only fork() if the write would block. Either way seem > basically fine, with the critical part being that the temporary file is > totally gone from the equation.
Except you now added forking. -- konsolebox