This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Need Clarification: Debugging EBADF occurance


Hello,

I am debugging glibc for a sample fifo application having independent
reader/writer.
Application crashes with EBADF error number after few hours(between 2 - 6 hrs)
of application being run,
Navigating the libc code, i see, EBADF is set during:
ÂÂÂÂÂÂÂÂÂÂ - Attempt to read on NO_READ Â permission
ÂÂÂÂÂÂÂÂÂÂ - Attempt to write on NO_WRITE permission

This check happens in underflow/overflow function as:
Âif (fp->_flags & _IO_NO_READS)
{
Âfp->_flags |= _IO_ERR_SEEN;
Â__set_errno (EBADF);
Âreturn EOF;
}

I want to know where and why NO_ERAD/NO_WRITE flag is set?.

Note:
ÂÂÂÂÂÂÂ -Â I am using fread/fwrite and fifo us created using mknod (...).
ÂÂÂÂÂÂÂ -Â Platform : ARM Board with linux kernel version 2.6.29


Thanks in advance.

Regards,
Rajanikanth


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]