[net.unix-wizards] bourne shell \"read\" vs. hangup trap

gwyn@BRL.ARPA (VLD/VMB) (11/26/85)

Your test script works fine on a real SVR2 Bourne shell.
I suspect your problem is due to the auto-restart of
slow system calls (such as read from a terminal) after
interruption by a signal, a "feature" of 4.2BSD.  There
is some attempt in their /bin/sh to handle the new
signal behavior, but it isn't complete.

Use a BRL Bourne shell instead (or get one from Robbins).