Tcl Source Code

View Ticket
Login
Ticket UUID: 2976509
Title: Bogus field reference in TtyInit() in unix/tclUnixChan.c
Type: Bug Created on: 2010-03-25 14:49:03
Submitter: reeuwijk Assigned to: andreas_kupries
Subsystem: 27. Channel Types Severity:
Priority: 5 Medium Last modified: 2026-10-22 17:19:30
Status: Closed Closed by: serhiy.storchaka
Resolution: Fixed Closed on: 2026-10-21 10:03:37
Version: None
Description:
The function TtyInit() in unix/tclUnixChan.c has the following code fragment:

#ifdef USE_SGTTY
        if ((iostate.sg_flags & (EVENP | ODDP)) ||
                !(iostate.sg_flags & RAW)) {
            ttyPtr->stateUpdated = 1;
        }
        iostate.sg_flags &= EVENP | ODDP;
        SET_BITS(iostate.sg_flags, RAW);
#endif  /* USE_SGTTY */


However, ttyPtr points to a TtyState, which does not have a stateUpdated field. From the context it looks far more likely that this should simply be:

if( ... ){
    stateUpdated = 1;
}
User Comments:
dkf added on 2010-03-25 21:59:32:
You have a platform which uses sgtty? Wow...

serhiy.storchaka added on 2026-10-21 10:03:37:

The sgtty code, including this fragment, was removed by [993c21721a] in 8.6.1.