diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2017-04-23 22:39:02 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2017-04-23 22:39:21 +0100 |
commit | 3cf9beab238c015964bb1c8193d9a4394fce3a21 (patch) | |
tree | 5f6b1dce85756729b21abec4f2874cef40bde989 /dev-lang/crystal/files | |
parent | dev-perl/File-Next: 1.160.0 ALLARCHES stable re bug #615692 (diff) | |
download | gentoo-3cf9beab238c015964bb1c8193d9a4394fce3a21.tar.gz gentoo-3cf9beab238c015964bb1c8193d9a4394fce3a21.tar.bz2 gentoo-3cf9beab238c015964bb1c8193d9a4394fce3a21.zip |
dev-lang/crystal: Workaround tty corruption in crystal, bug #616256
Patch restores blocking mode of file desriptors in exchange
of potential runtime deadlocks when dealing with stdio.
As it's a potentially invasive patch it's not enabled by default
and is available only under USE=blocking-stdio-hack
Reported-by: Renich Bon Ciric
Bug: https://github.com/crystal-lang/crystal/issues/2065
Bug: https://bugs.gentoo.org/616256
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'dev-lang/crystal/files')
-rw-r--r-- | dev-lang/crystal/files/crystal-0.22.0-blocking-stdio-hack.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/dev-lang/crystal/files/crystal-0.22.0-blocking-stdio-hack.patch b/dev-lang/crystal/files/crystal-0.22.0-blocking-stdio-hack.patch new file mode 100644 index 000000000000..07b7dba7be65 --- /dev/null +++ b/dev-lang/crystal/files/crystal-0.22.0-blocking-stdio-hack.patch @@ -0,0 +1,20 @@ +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 |