cat
не знает о сигналах echo
. Он получает состояние конца -из -файла на man pipe (7):
If all file descriptors referring to the write end of a pipe have been closed, then an attempt to read(2) from the pipe will see end- of-file (read(2) will return 0).
Однако для записи в канал существует SIGPIPE. См. ту же справочную страницу