interpretation of IO redirection request in shell to /dev/null sometimes works 
and sometimes doesn't
----------------------------------------------------------------------------------------------------

                 Key: JRUBY-1676
                 URL: http://jira.codehaus.org/browse/JRUBY-1676
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.1
         Environment: MacOS 10.4.11, Java 1.5.0_07-164, jruby trunk r5169
            Reporter: Stephen Bannasch
            Assignee: Thomas E Enebo


Running a shell command and redirecting error output to /dev/null works with 
some shell commands and doesn't work with some others. 

In the test below the dir 'abc' does not exist.

testing in jirb:

irb(main):010:0> `ls abc 2> /dev/null`
=> ""
irb(main):011:0> `/sbin/ifconfig 2> /dev/null`
ifconfig: interface 2> does not exist
=> ""

Testing in MRI irb:

irb(main):008:0> `ls abc 2> /dev/null`
=> ""
irb(main):009:0> `/sbin/ifconfig 2> /dev/null`
=> "lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384\n\tinet6 ::1 
prefixlen 128 \n\tinet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 \n\tinet 127.0.0.1 
netmask 0xff000000 \ngif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280\nstf0: 
flags=0<> mtu 1280\nen0: 
flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500\n\tether 
00:1b:63:1e:b2:da \n\tmedia: autoselect status: inactive\n\tsupported media: 
autoselect 10baseT/UTP <half-duplex> 10baseT/UTP <full-duplex> 10baseT/UTP 
<full-duplex,hw-loopback> 10baseT/UTP <full-duplex,flow-control> 100baseTX 
<half-duplex> 100baseTX <full-duplex> 100baseTX <full-duplex,hw-loopback> 
100baseTX <full-duplex,flow-control> 1000baseT <full-duplex> 1000baseT 
<full-duplex,hw-loopback> 1000baseT <full-duplex,flow-control> none\nen1: 
flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500\n\tinet6 
fe80::21b:63ff:febf:4a9d%en1 prefixlen 64 scopeid 0x5 \n\tinet 63.138.152.170 
netmask 0xffffff00 broadcast 63.138.152.255\n\tether 00:1b:63:bf:4a:9d 
\n\tmedia: autoselect status: active\n\tsupported media: autoselect\nwlt1: 
flags=41<UP,RUNNING> mtu 1500\nfw1: 
flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 2030\n\tlladdr 
00:1b:63:ff:fe:67:cc:4c \n\tmedia: autoselect <full-duplex> status: 
inactive\n\tsupported media: autoselect <full-duplex>\n"



-- 
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

Reply via email to