HBASE-18970 fix hbase shell reading interactive input (Amit Virmani)

This commit is contained in:
Mike Drob 2017-12-19 16:36:46 -06:00
parent f80d2e9c8e
commit db5bfedd2d
1 changed files with 4 additions and 0 deletions

View File

@ -40,6 +40,10 @@ module IRB
devnull = 'NUL' if WINDOZE
f = File.open(devnull, 'w')
$stdout = f
# This is a workaround for the jruby issue 1372.
# The stderr is an input to stty to re-adjust the terminal for the error('stdin isnt a terminal')
# incase the command is piped with hbase shell(eg - >echo 'list' | bin/hbase shell)
`stty icrnl <&2`
super
ensure
f.close