# Help with Errno.EBADF

**URL:** <https://www.ruby-forum.com/t/help-with-errno-ebadf/89843>\
**Category:** Ruby\
**Created:** [March 23, 2007, 4:22am UTC](https://www.ruby-forum.com/t/help-with-errno-ebadf/89843 "2007-03-23T04:22:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RubyCrazy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/848f3c/32.png) [@RubyCrazy](https://www.ruby-forum.com/u/RubyCrazy)\
**Post date:** [March 23, 2007, 4:22am UTC](https://www.ruby-forum.com/t/help-with-errno-ebadf/89843/1 "2007-03-23T04:22:46Z")

</div>

Hello all,

I am referring to the thread here -

> **[ActiveState Community](https://community.activestate.com)**
>
> Community support for users of the ActiveState Platform.

Can someone throw more light on what’s

Errno::EBADF in the code -  
begin

# Read stuff etc.

rescue Errno::EBADF

# Whatever

end

Thanks.

---

<div class="post-metadata">

**Author:** ![RubyCrazy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/848f3c/32.png) [@RubyCrazy](https://www.ruby-forum.com/u/RubyCrazy)\
**Post date:** [March 23, 2007, 7:30am UTC](https://www.ruby-forum.com/t/help-with-errno-ebadf/89843/2 "2007-03-23T07:30:58Z")

</div>

Those come from `errno''. See the errno(3) manpage. And, from that man:`EBADF Bad file descriptor (POSIX.1)’’

However, I have no idea what would cause it. Possibly closing a FD  
and then trying to use it later (think C/low-level) but, I’m note  
sure.

Paul
