I cannot recreate this in my environment (RHEL). CTRL-C works great for me. After your terminal closes, I will open a new one and use strace -pit to see what happens.
I think there are some problems with setting up the team as a whole.
First, you come to cata subshell. Doing this makes the stdincommandscat /dev/null , not the output nc, which you connect into a subshell. You can see the difference by comparing the output of this:
#! /bin/bash
while true; do
echo yay |
(cat & false) ||
break
done
with this:
#! /bin/bash
while true; do
echo yay |
(cat ; false) ||
break
done
, , , , , , echo, , . , false echo:
#! /bin/bash
while true; do
echo yay |
(cat & echo test) ||
break
done
, @chepner, nc . :
-l Used to specify that nc should listen for an incoming connection rather than initiate a connection to a remote host. It is an error to use this option in conjunction with the -p, -s, or -z options.
, nc ( , ). , mkfifo resp ; nc -l -p 80 < resp root, echo -e "HTTP/1.1 200 OK\r\n\r\nhello :)" > resp root.
, .