Skip to content

stty settings don't stick when invoked as a subprocess #5498

@carenas

Description

@carenas

Description / Steps to reproduce the issue

compile the following application in a non MSYS environment:

#include <windows.h>
#include <stdio.h>

int main(void)
{
        char buf[32];

        system("stty -echo");
        gets(buf);
        printf("INPUT: %s\n", buf);

        return 0;
}

A TCL example reported earlier in #3011

Expected behavior

no output while typing, like when build/run in an MSYS2 terminal or another OS

Actual behavior

terminal echo is active, calling GetConsoleMode() before and after the system() call confirms the mode hasn't changed

Verification

Windows Version

MINGW64_NT-10.0-26100

Are you willing to submit a PR?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions