Similarly, if the STDIN is opened in nonblocking mode one can just issue `LibC.read` on it until it returns EAGAIN or EOF (and collect the results). Naqvis’ solution seems cleaner.
I do wonder if there are portable solutions though.
It actually was not just docker bug, it was pipeline, ruby with backticks calls docker which run crystal.
when I change backticks to system, bug gone. but still there is some problem in crystal, because no any other soft with stdin capabilities hangs, except crystal.