mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
use tty(1) to check if /dev/tty is usable or not
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8d236bc0b1
commit
78e3185a20
1 changed files with 1 additions and 1 deletions
|
@ -2429,8 +2429,8 @@ End
|
||||||
def test_ioctl_linux2
|
def test_ioctl_linux2
|
||||||
return if /linux/ !~ RUBY_PLATFORM
|
return if /linux/ !~ RUBY_PLATFORM
|
||||||
return if /^i.?86|^x86_64/ !~ RUBY_PLATFORM
|
return if /^i.?86|^x86_64/ !~ RUBY_PLATFORM
|
||||||
return unless File.exist?('/dev/tty')
|
|
||||||
|
|
||||||
|
return unless system('tty', '-s') # stdin is not a terminal
|
||||||
File.open('/dev/tty') { |f|
|
File.open('/dev/tty') { |f|
|
||||||
tiocgwinsz=0x5413
|
tiocgwinsz=0x5413
|
||||||
winsize=""
|
winsize=""
|
||||||
|
|
Loading…
Reference in a new issue