You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-lang/crystal/files/crystal-0.22.0-blocking-std...

21 lines
564 B

Workaround tty corruption in crystal.
Patch restores blocking mode of file desriptors
in exchange of potential runtime deadlocks
when dealing with stdio.
Reported-by: Renich Bon Ciric
Bug: https://github.com/crystal-lang/crystal/issues/2065
Bug: https://bugs.gentoo.org/616256
diff --git a/src/compiler/crystal/stdio.cr b/src/compiler/crystal/stdio.cr
new file mode 100644
index 000000000..e65f65089
--- /dev/null
+++ b/src/compiler/crystal/stdio.cr
@@ -0,0 +1,5 @@
+module Crystal
+ STDIN.blocking = true
+ STDOUT.blocking=true
+ STDERR.blocking = true
+end