[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "here strings" and tmpfiles

From: konsolebox
Subject: Re: "here strings" and tmpfiles
Date: Thu, 11 Apr 2019 04:27:22 +0800

On Tue, Apr 9, 2019 at 10:01 PM Jason A. Donenfeld <address@hidden> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]