W dniu 08.09.2020 o 03:40, Michael Hamilton pisze:
On Tuesday 08 September 2020, Carlos E. R. wrote:
... Does the named pipe "live" in ram or in disk? I might push it to a tmpfs in the second case.
...
As I understand it Linux implements named pipes with buffer memory, they are not backed by disk. The amount of allocated memory is limited, if the written data is not consumed fast enough, the writer will block until the reader catches up - you can test this by not reading from the fifo, the dd will block. At least that how things appear to work when I tested it by using a Tumbleweed 4GB ISO.
Michael
That's true. There's a hack that allows to use this to detect on the server if you're using `curl | bash`. If bash is not reading input, then curl pauses downloading. https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-bash-server-side/ If you want to have a bigger buffer, you can put a `buffer` command (sudo zypper in buffer) in the pipeline.