From: "Iñaki Baz Castillo" Date: 2010-01-16T09:01:47+09:00 Subject: Re: How to know if $stderr is reopened to /dev/null El Sábado, 16 de Enero de 2010, Seebs escribió: > On 2010-01-15, Iñaki Baz Castillo wrote: > > Hi, how could I know if $stderr has been redirected to /dev/null? > > You couldn't. > > Consider a wrapper: > > exec 5>/dev/null > ruby foo.rb 2>&5 > > Or for that matter, a file "/home/ibc/nulldev" which happens to be > a character special device using the same driver as /dev/null. > > ... Note that this assumes that what you care about is "$stderr is > being thrown away", not the exact path by which it's being done. Thanks for the clarification. However it's enough for me using $stderr.tty?. This is, I just care when $stederr is not pointing to a terminal. -- Iñaki Baz Castillo