https://gitlab.com/tezos/tezos
Revision f9c6f24b05c2a7354c956486ca746353d18e61f2 authored by Thomas Letan on 26 May 2023, 07:21:51 UTC, committed by Marge Bot on 30 May 2023, 08:48:22 UTC
`tail -F' is more reliable, because `-F' implies retrying.

When messing around with runners, I ran into scenarios where the `cat' call
would prematurly exit (typically when importing a snapshot from a remote),
which then would cause the daemon to hang when it tried to write in the pipe.

`tail -F' is often suggested as a way to ensure your pipe remains always
writable. Applying this suggestion fixes my issue.

One can convinces oneself that this approach is fine by running existing
scenarios from the `bin_testnet_scenarios' folder. Additionnally, from a
terminal

    mkfifo foo
    tail -F foo

and from another terminal

    echo bar > foo
    echo foobar > foo

will have the expected outcome, that is `bar' then `foobar' are printed by the
`tail' process.
1 parent 856bcdf
History
Tip revision: f9c6f24b05c2a7354c956486ca746353d18e61f2 authored by Thomas Letan on 26 May 2023, 07:21:51 UTC
Tezt: Use `tail -F' instead of `cat' with runners
Tip revision: f9c6f24
File Mode Size
README.md -rw-r--r-- 26 bytes

README.md

back to top