Revert "Remove possible leak when exception occurred."

This reverts commit d370decd0321675f19f142f588522dc3631d411c.
Revert "The VM handles blocking SIGPIPE."

This reverts commit 38dcf7ff2ebd96b8990498f6251a4613163748ca.