Prevent infinite loop if the GnuPG subprocess dies while we're trying to write. See PHP Bug #39598.