Re: Bad file descriptor error
- From: Robert Klemme <shortcutter@xxxxxxxxxxxxxx>
- Date: Sun, 12 Apr 2009 17:53:58 +0200
On 12.04.2009 04:58, Roger Pack wrote:
Errno::EBADF: Bad file descriptor
from C:/Ruby/lib/ruby/1.8/net/http.rb:564:in `write'
from C:/Ruby/lib/ruby/1.8/net/http.rb:564:in `warn'
from C:/Ruby/lib/ruby/1.8/net/http.rb:564:in `connect'
from C:/Ruby/lib/ruby/1.8/net/http.rb:553:in `do_start'
from C:/Ruby/lib/ruby/1.8/net/http.rb:542:in `start'
from C:/Ruby/lib/ruby/1.8/net/http.rb:1035:in `request'
from C:/Ruby/lib/ruby/1.8/net/http.rb:845:in `post'
from (irb):15:in `authentication'
from (irb):23
from :0
irb(main):024:0>
It may mean that google has summarily hung up on you.
I believe you would see a different error. EBADF occurs, if the file descriptor (i.e. the numeric value) is invalid. You can provoke it by doing something like this
ruby -e 'File.open(10, "w") {|f| f.puts "test"}'
Whereas it does not happen if you do
ruby -e 'File.open(1, "w") {|f| f.puts "test"}'
One way to create this is to open a file, remember the number returned from #fileno, close the file and then open another file with the remembered number (file descriptor).
Kind regards
robert
.
- References:
- Bad file descriptor error
- From: Mwenge Mulenga
- Re: Bad file descriptor error
- From: Roger Pack
- Bad file descriptor error
- Prev by Date: Re: Can Ruby stay ahead ?
- Next by Date: Re: Output UTF-16LE BOM to file - 1.9
- Previous by thread: Re: Bad file descriptor error
- Next by thread: ruby-exiv2 \?
- Index(es):
Relevant Pages
|