This does the same thing and also fixes the trapping in some (possibly broken) shells. Suggested by Michael Kostylev. Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit 93bb9ff08e)
93bb9ff08e