STDIN/STDOUT/STDERR of a process started with Kernel#exec or Kernel#system are
not TTY (but with MRI it is)
-----------------------------------------------------------------------------------------------------------
Key: JRUBY-5715
URL: http://jira.codehaus.org/browse/JRUBY-5715
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.6, JRuby 1.5
Environment: uname -a
Linux desktop.local 2.6.35-28-generic #50-Ubuntu SMP Fri Mar 18 18:42:20 UTC
2011 x86_64 GNU/Linux
jruby -v
jruby 1.6.0 (ruby 1.8.7 patchlevel 330) (2011-03-15 f3b6154) (OpenJDK 64-Bit
Server VM 1.6.0_20) [linux-amd64-java]
Reporter: Anton Ageev
Attachments: isatty.c
I attached simple test tools {{isatty}} to demonstrate this bug.
{code}
$ ruby -v
ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]
$ jruby -v
jruby 1.6.0 (ruby 1.8.7 patchlevel 330) (2011-03-15 f3b6154) (OpenJDK 64-Bit
Server VM 1.6.0_20) [linux-amd64-java]
$ ruby -e '["stdin", "stdout", "stderr"].each { |s| system "./isatty #{s}" }'
Yes
Yes
Yes
$ jruby -e '["stdin", "stdout", "stderr"].each { |s| system "./isatty #{s}" }'
No
No
No
{code}
I tried to patch Ruby on Rails to make {{rails dbconsole}} working with
{{jdbcpostgresql}} adapter, but I noticed that started {{psql}} command has no
prompt because {{psql}} detected not interactive environment using {{isatty}}
function.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email