From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11olkn2068.outbound.protection.outlook.com [40.92.20.68]) by sourceware.org (Postfix) with ESMTPS id 7F90B3870846 for ; Thu, 7 May 2020 14:41:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7F90B3870846 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FCF/YZODtfP5wOqdeN0DigoxVnFfd8CjJrzQSwgBW6ZukRG5kGtNQlc8iaCbVQ+LVDKH1O8qQFfdZ61OIbE04IHc2GRmOhS7LTtcfRh6DyTmcDmRG+6aNQFmtRzZMcRElT0hGn2iEuWZ7G0HIPYweu92AB8Ejpr45Un7JGwgVNUvEfbz7A7coMep+xzsIqHOVGt70m2gjW2hWxZhLKPpSdUjZfEn2qwGFY4joH5YVujN7FVp6zFTcc9rGL5uKOQSI1QSDW003nm4WXCGMAad36zULKf1Jac88JtQjBbzuesQPnlte7OYhKju45/SGHXuGNVFCOuIBX0F8clotL5eeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gsVAKDQdNWcKLgI/HTDMP/sSayGqNbHTA3dFhcPbfrc=; b=VYsE2V53oWZ/vMJ82rLhm6VS3/8Wx3fEjMESKDUIle6HIkA2UMT7pZAQ1D4PFF/Oo2smiVB4hcRI2f0kMy9jRGlkErdZnRLmHK0grX7ssWn5uCh2/ba2BWKkcZAm5lwyxVJQiwI3ZIe59bWygD6P2pSbhs7/qdiwhS7q0p4rgEW6OTbNNmNUy1ut1AHr9HPKMugVdLi3oMJ/FXaCxVUQZEni7JIBArInrexidWWZ681PukdpzWzu+3h1P4cuUOzNBzDeD9LQrLbbIowAOMBsZVZSjlJJB5Y7Bn/Av7uhR8k6iEPT+f1lPKVkmbkChEIULIzLHYYLC6EbobWZn0JshA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from BN8NAM11FT028.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4b::44) by BN8NAM11HT026.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4b::66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.27; Thu, 7 May 2020 14:41:17 +0000 Received: from MN2PR04MB6384.namprd04.prod.outlook.com (2a01:111:e400:fc4b::51) by BN8NAM11FT028.mail.protection.outlook.com (2a01:111:e400:fc4b::225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.27 via Frontend Transport; Thu, 7 May 2020 14:41:17 +0000 Received: from MN2PR04MB6384.namprd04.prod.outlook.com ([fe80::a56c:776b:8533:e41f]) by MN2PR04MB6384.namprd04.prod.outlook.com ([fe80::a56c:776b:8533:e41f%4]) with mapi id 15.20.2979.027; Thu, 7 May 2020 14:41:17 +0000 From: =?iso-8859-1?Q?Andr=E9_Bleau?= To: "cygwin@cygwin.com" Subject: Re: Problems with a combination of a mingw program, mintty, and CYGWIN=disable_pcon Thread-Topic: Problems with a combination of a mingw program, mintty, and CYGWIN=disable_pcon Thread-Index: AQHWJBqRl4Thy+f3TUe8HOxPs6713KicaR2AgABFuyM= Date: Thu, 7 May 2020 14:41:17 +0000 Message-ID: References: , <20200507191707.48a948b5c573592d9d293f7a@nifty.ne.jp> In-Reply-To: <20200507191707.48a948b5c573592d9d293f7a@nifty.ne.jp> Accept-Language: fr-CA, en-US Content-Language: fr-CA X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:0662CDBC611E3B8F51D709481891C95E5D0C0A8792061D588DE772E85362D015; UpperCasedChecksum:B16001DA3C8212B0220F0832E934CF6F73CAE7BE24EB207E85C82E043B9C6730; SizeAsReceived:7072; Count:45 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [fIWV/0H2NyLsOyTaMB9uA/if/6SvwvmZ] x-ms-publictraffictype: Email x-incomingheadercount: 45 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: b8fa8258-5628-44ad-dc88-08d7f294b390 x-ms-traffictypediagnostic: BN8NAM11HT026: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: igkvK4MxG15MkS+yMfbEQxVzB2nu+g5D5k5huHdsM1CPJOgGA5ckVeEuXNYqDkgfhsP4wC9bXGPlXvPeHXhB1vbsft36KtuVAAubZJrsLPQvrgpvYfDlSzGOBUyWN1xIqbO2TB6MLeNdoOerkC+1rRzvCDchdv1gdJYDjbDZgPuK78A1WU1+nEDIiPu1OeMr3YCJyjC/6kQGJP8fg5qHvA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:0; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR04MB6384.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:; DIR:OUT; SFP:1901; x-ms-exchange-antispam-messagedata: qSv0NK3nNRHlCOM9AuCl8ILAqoPFdH+XFszQ0KpVFuIiproRElXOeDwKabiKR27uj/hAmH7+GDoGApGIRxN9FyA7Hnn6inEF1on/vPUdL/JsOs9gf8r7VVwcuyATv5cgkdN7Mxz9WpeE8i27WgS2Mw== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: b8fa8258-5628-44ad-dc88-08d7f294b390 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2020 14:41:17.6766 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8NAM11HT026 X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2020 14:41:19 -0000 Takashi Yano wrote:=0A= ________________________________________=0A= Hi Andr=E9,=0A= =0A= Thanks for the report.=0A= =0A= On Thu, 7 May 2020 03:38:25 +0000=0A= Andr=E9 Bleau via Cygwin wrote:=0A= > Hi cygwin users,=0A= >=0A= > I have cli program that I run with mintty. It is a simple C++ program, re= ading from cin and outputing to cout. It is cross-compiled as a mingw progr= am. I've been running it without problems fro over 2 years. Recently, I upd= ated cygwin to 3.1.4-1 and noticed the pcon support. Since then, the output= of my program has been messy: output lines have intermittent gaps in them.= I made a simple test case that reproduces the problem, from the following = simple C++ file, hello.cpp :=0A= >=0A= > #include =0A= > using namespace std;=0A= > static string Green =A0 =A0 =A0 =A0 =A0 =3D "\033[32m";=0A= > static string Yellow =A0=3D "\033[33m";=0A= > static string Reset =A0 =A0 =A0 =A0 =A0 =3D "\033[0m";=0A= =0A= To use escape sequences in pseudo console, please add the following=0A= code just like in normal cosole (command prompt).=0A= =0A= #include =0A= ...=0A= DWORD mode;=0A= GetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), &mode);=0A= mode |=3D ENABLE_VIRTUAL_TERMINAL_PROCESSING;=0A= SetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), mode);=0A= =0A= This should solve your problem.=0A= =0A= --=0A= Takashi Yano=0A= ________________________________________=0A= =0A= Hi Takashi. Thanks for the quick response. Adding these lines of codes to m= y program and to the simple test case mentioned=0A= solved the problem of gaps in lines when run from mintty with pcon enabled.= =0A= =0A= However, it does not solve the problem of mintty misbehavior when started f= rom a bash script to run the same program. =0A= Maybe this is a problem that Thomas Wolf would be interested in.=0A= =0A= Regards,=0A= =0A= - Andr=E9 Bleau=0A=