delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/11/21/05:05:46

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 5ALA5kFo3659712
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 5ALA5kFo3659712
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=hKy64eiw
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B11E4385AC33
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1763719545;
bh=Ivn3stjx0yLagk0FX/Xi2PaYG0GPFLSF8QvIsfEI8fU=;
h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=hKy64eiwyhSaDVOvftePU5NEJTcuExfWILy0zDSL4RXFOFQnp9dfb0qmQqKNVss0Z
39XWT4j9ZAdgRopa5keUoK1pQcnCB3fhFZMhBOyp7qapMpbcOj7/AcrNNP1HukCisd
kwi0g4Mxtn88/g5wDu9vr/tZPh9Lv4OvePbrK7Jg=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E0D14385AC1C
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E0D14385AC1C
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1763719476; cv=none;
b=ScN3M+Kxfth3szVdoRaZTmIUuzDAlYA4Y9Zd62bFyoxeoQUGTU7FPHwcC1ORaVW5IwGMQNd4/d/fUbxShxj5jcLFQHZk2uool3dhZglftICxC7HxcBBx4irgbgIL/WcttRZPcCWLx8YBxXMavjRICvHXgbdMuHaFelIFdI0r90I=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1763719476; c=relaxed/simple;
bh=GFPSnYQXfqJkzFUZrcfs0Bg5REeFDvw7KwRu0/tSesM=;
h=Date:From:To:Subject:Message-Id:Mime-Version:DKIM-Signature;
b=ieQhNM5PhE7Gkpsd8vMLEAQIEKthGMauA9cwg5EnI2B90oojZ0hZFQs4TC6NE1tuYAHBRKox5+P2QHewLRqgDR+LKUK0BMiqA/s80rTcdl1GrI4o/PYtqVPlE9ceaHhVsgoUTej8M6Qmm/1gLpAULUW3AGlyQPVuegVy+NjngJ0=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E0D14385AC1C
Date: Fri, 21 Nov 2025 19:04:33 +0900
To: cygwin AT cygwin DOT com
Subject: Re: dynamic conpty loading
Message-Id: <20251121190433.4a37dc959848a0aea89a8922@nifty.ne.jp>
In-Reply-To: <707f4d4c-a20d-4f1d-bdbd-65a2392dea15@towo.net>
References: <f52d9663-b210-497a-867b-5193b420ea0b AT towo DOT net>
<30deef29-ba20-49d9-9b38-28020941b0ef AT towo DOT net>
<707f4d4c-a20d-4f1d-bdbd-65a2392dea15 AT towo DOT net>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Takashi Yano via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

Hi Thomas,

I'm very sorry for replying so late. 

On Sun, 5 Oct 2025 10:15:55 +0200
Thomas Wolff wrote:
> Am 10.09.2025 um 11:21 schrieb Thomas Wolff via Cygwin:
> > [Reposting by response from cygwin-developers]
> >
> > I wrote:
> >> The ancient conhost and also the initial conpty implementation of 
> >> Windows were obstacles to using terminal feature from Windows 
> >> applications.
> >> There are nuisances like mangled or ignored character attributes, 
> >> terminal reports not passed through etc.
> >> While there is an updated Windows conpty layer being developed as 
> >> part of the Windows terminal project, it is not yet deployed with 
> >> Windows 11 and will probably not be deployed with Windows 10 at all 
> >> anymore (https://github.com/microsoft/terminal/issues/17452).
> >> Various terminals had to fight with these problems and some found a 
> >> solution.
> >> According to 
> >> https://github.com/saitoha/libsixel/issues/199#issuecomment-3181728693 
> >> it is possible to inject a specific version of conpty so to supersede 
> >> the Windows-installed conhost.exe.
> >>
> >> I've tried to apply that to mintty by just preloading a conpty.dll 
> >> before calling forkpty for the terminal child process but that has no 
> >> effect.
> >> The procedure seems to be:
> >> try LoadLibrary("conpty.dll"), (if not successful, fallback to 
> >> GetModuleHandle("kernel32") instead) to retrieve GetProcAddress for 
> >> CreatePseudoConsole, ResizePseudoConsole, ClosePseudoConsole, and 
> >> then somehow (?) use those while calling CreateProcess.
> >> The latter is woven into the cygwin library and I don't think it's a 
> >> good idea to clone that out of cygwin for a patched process creation 
> >> in mintty.
> >>
> >> My question/suggestion:
> >> Can a cygwin mode switch to a selected conpty library instead of the 
> >> default one please? My idea would be to configure this per process 
> >> with the environment variable CYGWIN. Like its error_start= setting, 
> >> it could have a conpty= setting to configure the filename to be used 
> >> for conpty when starting a subprocess.
> >> That would allow mintty to inject a modern conpty when calling a 
> >> Windows application (e.g. wsl.exe).
> >>
> > Thomas
> It would also help if someone writes a small wrapper that loads a local 
> conpty.dll version, runs CreatePseudoConsole from it, and invokes 
> wsl.exe (likely with CreateProcess). I somehow fail to get this working, 
> being umfamiliar with Windows intrinsics...

I'm not sure what is the advantage of dynamic conpty loading.
Does this allow use newer functionality than using conhost.exe?
Or something else?

-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019