sh is not properly clearing the variable when a timeout occurs.
This was previously avoided, by unsetting the variable before calling
read, before 6908b9791f1.
The patch for upstream sh is at https://reviews.freebsd.org/D31876
Fixes #917
Fixes: 6908b9791f1 ("The trappedinfo hack can use read_blocking() now.")