I'll have a look. A few comments inline below.

On 6/29/06, Thomas E Enebo <[EMAIL PROTECTED]> wrote:
On Thu, 29 Jun 2006, Charles O Nutter defenestrated me:
>
>    Whee!

  I needed to do a surprising additional number of things to
get rails silence_stderr working with this patch.  Here is a break-
down:

1. reopen with string as first arg should retain permissions/modes
   of IO it is reopening.  I believe this has to be right.

The reopen thing worried me too since I knew some of that was going on with the /dev/null thing.

2. dup should retain dup'd objects permissions/modes.  This also
   seems like a for sure thing.

Agreed.

3. reopen needed same /dev/null check that RubyFile has in reopen.
   As hacky as hacky gets.

Hacky but temporary. Another way to fix this might be to include "win" in the platform when running on windows, and that might also just make it work...but I don't know with what side effects.

4. IOHandlerUnseekable now refuses to close System.out and System.err.
   This is also a hack.  The solution involves much too much stuff
   to be safe right now.  Really a io.dup should clone the underlying
   IOHandler.  If multiple IO's point to same underlying stream
   then a close should not really close the underlying stream.
   I believe this is consistent with C FILE* and friends (C Ruby
   semantics I think rely on FILE* and friends)?

Since IO streams in Java close when you tell them to we'll need to do some kind of reference counting to know when the last IOHandler lets go.  We'll probably need a better solution long-term, but it may be ok for now.

  Please look this over.  I would like to include this for 0.9.0
since it makes Rails commands that perform command checks work without
needing to patch Rails.

I don't like patching but I also don't like last minute changes like this. Thankfully this should only affect opening /dev/null (right?) and so if it's busted we just tell people to patch anyway. 

-Tom

--
+ http://www.tc.umn.edu/~enebo +---- mailto:[EMAIL PROTECTED] ----+
| Thomas E Enebo, Protagonist  | "Luck favors the prepared    |
|                              |  mind." -Louis Pasteur       |


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


_______________________________________________
Jruby-devel mailing list
Jruby-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jruby-devel






--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ www.jruby.org
Application Architect @ www.ventera.com
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jruby-devel mailing list
Jruby-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jruby-devel

Reply via email to