From: Chad Fowler Date: 2003-02-12T00:51:43+09:00 Subject: Re: Broken pipe (Errno::EPIPE) Robert Feldt wrote: >On Sat, 1 Feb 2003, Chad Fowler wrote: > > > >>>I have a ruby app which renames a bunch of files using File.rename. When I >>>run it in debug mode (with "-r debug") and steps through it it works >>>without problems but when I run it normally or when packed up as an exe >>>with exerb I get >>> >>>script.rb:778:in `rename': Broken pipe - "file.ext" (Errno::EPIPE) >>> >>>after a couple of files have been renamed. >>> >>>Anyone knows what can cause this behavior? >>> >>> >>> >>I'm not seeing anything in Ruby that would cause this. rb_file_s_rename >>doesn't provide many opportunities taht I can see. I wonder if this could >>be a problem with mingw32/cygwin. Any other special characteristics of >>this program? Multithreaded, etc? >> >> >> >Sorry I never answered to this one Chad. I found the bug so forgot about >this. Problem was I tried to rename files for which there were unclosed >file handles. I figured that was the problem but thought I had thouroughly >ensured that there couldn't be any open handles left. I was mistaken. ;) > >Anyway thanks for trying to help, > >Robert > > > Thanks, Robert. No problem. I wonder if this is a situation where we could have a more descriptive error message. Thoughts everyone? Chad