When executing these command in fish shell
$ mkfifo answer
$ nc -vv -l -k -p 8001 <answer | tee -a answer
The command hangs.
If I write to answer through echo "" > answer. Then the nc resumes and starts listening correctly.
If, in contrary I CTRL-C the hanging process, here is the message:
^C<W> fish: An error occurred while redirecting file 'answer'
open: Interrupted system call
On the other hand, in bash, when executing:
$ mkfifo answer
$ nc -vv -l -k -p 8001 <answer | tee -a answer
Listening on localhost 8001
The command doesn't hang and start listening directly.
What happens differently in fish and in bash that explains this different behavior?