This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/10932] New: libio use isatty() but don't take care of -ENOTTY
- From: "yann at droneaud dot fr" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 9 Nov 2009 16:41:51 -0000
- Subject: [Bug libc/10932] New: libio use isatty() but don't take care of -ENOTTY
- Reply-to: sourceware-bugzilla at sourceware dot org
libio/filedoalloc.c:_IO_file_doallocate(), isatty() is called to check if file
descriptor is related to a tty.
But _IO_file_doallocate() don't take care of isatty() modifying errno.
According to http://www.opengroup.org/onlinepubs/9699919799/functions/isatty.html
isatty() could set errno to ENOTTY.
This is a problem for some stdio functions, particular fscanf() and fgetc() when
reading no regular file.
--
Summary: libio use isatty() but don't take care of -ENOTTY
Product: glibc
Version: 2.11
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: yann at droneaud dot fr
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=10932
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.