]> git.plutz.net Git - cgilite/commitdiff
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 ae09497817521d8795b0e92a7f859d5bda2426a9..333334c460f5cae9bc763f0079584a41132f70c5 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;