HBASE-26772 Shell suspended in background (#4137)

Signed-off-by: Sean Busbey <busbey@apache.org>
This commit is contained in:
Peter Somogyi 2022-03-01 11:52:07 +01:00 committed by GitHub
parent f8699176f7
commit 1f2ddbe7cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -33,7 +33,7 @@ module IRB
# happen is the shell exiting because of failed IRB construction with
# no error (though we're not blanking STDERR)
# Map the '/dev/null' according to the runing platform
# Map the '/dev/null' according to the running platform
# Under Windows platform the 'dev/null' is not fully compliant with unix,
# and the 'NUL' object need to be use instead.
devnull = '/dev/null'
@ -42,8 +42,10 @@ module IRB
$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`
# in case the command is piped with hbase shell(eg - >echo 'list' | bin/hbase shell)
if $stdin.tty?
`stty icrnl <&2`
end
super(workspace, input_method)
ensure
f.close

View File

@ -38,7 +38,9 @@
include Java
# Some goodies for hirb. Should these be left up to the user's discretion?
require 'irb/completion'
if $stdin.tty?
require 'irb/completion'
end
require 'pathname'
require 'getoptlong'