Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagesmc
Path: blob/master/build/pkgs/ecl/patches/write_error.patch
8820 views
1
diff -ru src/src/c/file.d b/src/c/file.d
2
--- src/src/c/file.d 2012-12-07 22:01:02.000000000 +0100
3
+++ b/src/c/file.d 2013-04-10 09:07:24.537513659 +0200
4
@@ -3335,7 +3335,8 @@
5
ecl_disable_interrupts();
6
do {
7
out = fwrite(c, sizeof(char), n, IO_STREAM_FILE(strm));
8
- } while (out < n && restartable_io_error(strm, "fwrite"));
9
+ /* Ignore write errors to stderr to avoid an infinite loop */
10
+ } while (out < n && (IO_STREAM_FILE(strm) != stderr) && restartable_io_error(strm, "fwrite"));
11
ecl_enable_interrupts();
12
return out;
13
}
14
15