kill program on connection loss
authorPaul Hänsch <paul@plutz.net>
Thu, 21 Nov 2019 00:50:57 +0000 (01:50 +0100)
committerPaul Hänsch <paul@plutz.net>
Thu, 21 Nov 2019 00:50:57 +0000 (01:50 +0100)
cgilite.sh

index ae09497..333334c 100755 (executable)
@@ -90,7 +90,7 @@ if [ -z "$REQUEST_METHOD" ]; then
       $CR) printf '%s %s\r\n%s\n%s\n\r\n' \
              'HTTP/1.1' "${cgilite_status%${CR}}" \
              "$cgilite_response" "${cgilite_cl}"
-           cat
+           cat || kill $$
            [ "${cgilite_cl#Connection}" = "${cgilite_cl}" ]; exit;;
       *) cgilite_response="${cgilite_response:+${cgilite_response}${BR}}${l}";;
     esac; done || exit 0;