public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* ioctl: FIONREAD and ENOTTY
@ 2011-07-20  8:11 Yaakov (Cygwin/X)
  2011-07-20 15:47 ` Corinna Vinschen
  0 siblings, 1 reply; 8+ messages in thread
From: Yaakov (Cygwin/X) @ 2011-07-20  8:11 UTC (permalink / raw)
  To: cygwin

On Linux, ioctl(2) returns several different errors[1]:

EBADF  d is not a valid descriptor.
EFAULT argp references an inaccessible memory area.
EINVAL Request or argp is not valid.
ENOTTY d is not associated with a character special device.
ENOTTY The specified request does not apply to the kind of object that
       the descriptor d references.

In the case of FIONREAD, Cygwin doesn't seem to distinguish between
EINVAL and ENOTTY, and this causes at least one major bug:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35536

I have patched GCJ and GNU classpath to work around it, but this really
needs to be fixed in Cygwin itself.


Yaakov

[1] http://www.kernel.org/doc/man-pages/online/pages/man2/ioctl.2.html



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-07-21 20:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-20  8:11 ioctl: FIONREAD and ENOTTY Yaakov (Cygwin/X)
2011-07-20 15:47 ` Corinna Vinschen
2011-07-20 22:37   ` Yaakov (Cygwin/X)
2011-07-21 14:40     ` Corinna Vinschen
2011-07-21 17:06       ` Christopher Faylor
2011-07-21 17:48         ` Corinna Vinschen
2011-07-21 19:58           ` Christopher Faylor
2011-07-21 20:22             ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).