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]

[Bug libc/13983] New: __libc_message() shouldn't blindly write to STDERR_FILENO


http://sourceware.org/bugzilla/show_bug.cgi?id=13983

             Bug #: 13983
           Summary: __libc_message() shouldn't blindly write to
                    STDERR_FILENO
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: unassigned@sourceware.org
        ReportedBy: nenolod@dereferenced.org
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


hi,

blindly writing to STDERR_FILENO is not posix-compliant, it is possible that
STDERR_FILENO may have been reassigned to a different descriptor.

see austin group bug #555 for more information.

i believe the solution is to check if STDERR_FILENO is a TTY (using isatty())
before using it, if it is not a TTY and there is no /dev/tty available to us,
then we should just go directly to vsyslog() branch.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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