Commit | Line | Data |
---|---|---|
5b9822cf JK |
1 | Patch adapted from Sage. |
2 | diff -Naur ecl-16.1.2.orig/src/c/file.d ecl-16.1.2/src/c/file.d | |
3 | --- ecl-16.1.2.orig/src/c/file.d 2016-05-11 13:10:51.867673867 +1200 | |
4 | +++ ecl-16.1.2/src/c/file.d 2016-05-11 14:44:48.121907307 +1200 | |
5 | @@ -3354,8 +3354,10 @@ | |
6 | ecl_disable_interrupts(); | |
7 | do { | |
8 | out = fwrite(c, sizeof(char), n, IO_STREAM_FILE(strm)); | |
9 | - } while (out < n && restartable_io_error(strm, "fwrite")); | |
10 | - ecl_enable_interrupts(); | |
11 | + /* Ignore write errors to stderr to avoid an infinite loop */ | |
12 | + } while (out < n && (IO_STREAM_FILE(strm) != stderr) && restartable_io_error(strm, "fwrite")); | |
13 | + | |
14 | + ecl_enable_interrupts(); | |
15 | return out; | |
16 | } | |
17 |