Hi,
while making the Kakoune editor work on OpenBSD, I encountered some
strange behaviour [1]. This little script doesn't work with the OpenBSD
sh, but works at least with dash, bash and zsh:

mkfifo 'testfifo'
cat "$(
    ( printf 'foo\n' > testfifo 2>&1 ) > /dev/null 2>&1 &
    printf 'testfifo'
)"

I can make it work for all the mentioned shells like this:

mkfifo 'testfifo'
cat "$(
    ( ( printf 'foo\n' > testfifo 2>&1 ) & ) > /dev/null 2>&1
    printf 'testfifo'
)"

Can someone explain or justify the behaviour of the OpenBSD sh, or do
you think this is a bug?

Cheers,
Richard Ulmer


[1] See https://github.com/mawww/kakoune/pull/2955 for more info.

Reply via email to