--- src/c/file.d.orig 2020-04-24 04:54:52.000000000 -0600 +++ src/c/file.d 2020-07-07 08:27:48.474295560 -0600 @@ -3536,7 +3536,8 @@ output_stream_write_byte8(cl_object strm ecl_disable_interrupts(); do { out = fwrite(c, sizeof(char), n, IO_STREAM_FILE(strm)); - } while (out < n && restartable_io_error(strm, "fwrite")); + /* Ignore write errors to stderr to avoid an infinite loop */ + } while (out < n && (IO_STREAM_FILE(strm) != stderr) && restartable_io_error(strm, "fwrite")); ecl_enable_interrupts(); return out; }