How to clear Bad File Descriptor error
I am running multi threaded files on my Linux System. The application here writes many small files over the NFS mount. It also continously return a failure code i.e. errorno, EBADF. I does not have any idea about this. Everything seems here to work fine on every client. At first I thought that fd was getting some issue here. Then I changed the code to fflush(). But still the error returns. Does anyone has idea about this. Thanks.
Re: How to clear Bad File Descriptor error
EBADF is a Bad File Descriptor error. Here the errors comes under this conditions. First if the file descriptor passed to syscall which is out of range or it is closed. Also if it is a invalid for the function which was requested. It is normally termed as a programming bug. I will recommend you to first check the file descriptor which must be set to -1.
Re: How to clear Bad File Descriptor error
The problem is often occurred absence of MySQL or any other database client which is not placed on your Linux machine. If you here using InstantRails on your system then that might be the cause. To fix the same again download the database and install the same on your computer. Also try to reinstall Ruby back. Choose custom install and modify the list of features.
Re: How to clear Bad File Descriptor error
The most proper way for this will be strace. Use strace -ff xterm in the newly open xterm and then exit it. It will be much better to do "strace -eopen,close -ff xterm". This will give the user a less junk to get through. Better re-install your database back again and get rid of it.