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