Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8ee28d9cc1e131d903940d35ab20ce8c4b19e0de22a07272a9b45ed3127bc424
Ticket: e87000d8425ab86af682dd8195b9d20826974ba8
crash for "fconfigure stdout" in Win32
User & Date: chw on 2020-08-12 11:39:27
Changes

  1. closedate changed to: "2459073.98572949"
  2. closer changed to: "chw"
  3. icomment:
    I think the problem is somewhat different. In the Win32 console case
    it starts with the (wrong) assumption, that the window size can be
    determined on stdin (the input handle from GetStandardHandle(...)).
    However, that information can only be read out from a console handle
    with a screen buffer, i.e stdout if obtained from GetStandardHandle().
    
    A proof of concept which properly supports -winsize is in the AndroWish
    repo, see 
    
    https://www.androwish.org/home/file?name=jni/tcl/win/tclWinConsole.c&ci=tip
    
    Regarding the crash: if you look at the various implementations of
    GetOptionsProc() most set a valid flag even in the optionName = NULL
    case and return earlier than Tcl_BadChannelOption(). Others deal with
    len > 0 (in case optionName is NULL, len is 0) and if len is zero don't
    call Tcl_BadChannelOption() at all.
    
  4. login: "chw"
  5. mimetype: "text/plain"