| delorie.com/archives/browse.cgi | search |
| DMARC-Filter: | OpenDMARC Filter v1.4.2 delorie.com 5AOCWwBP1489104 |
| 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 5AOCWwBP1489104 |
| 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=vwW+gW4P | |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org 1384D385841C |
| DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; |
| s=default; t=1763987577; | |
| bh=sjGEgXwmZAgA868X1/GKr5mYrNG3r2ycS6IT/PLiBnE=; | |
| h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: | |
| List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: | |
| From; | |
| b=vwW+gW4P3OQZhXpJLvpbNqv4x4K+Twi6KmKg/pc4vKiTwxBLMpmlk4ZmPPZHfA+ke | |
| KuCQSjJoCH5u+fEt7qRtl0YpQxyf7JXG4BM5eR+wa60QO3DVs0vQGjN7SzFUX7u3tc | |
| XJV5Fx9nPWCX1xG5EaqvJLZuGj6dRBC8nM+ugj8E= | |
| X-Original-To: | cygwin AT cygwin DOT com |
| Delivered-To: | cygwin AT cygwin DOT com |
| DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org 8DA473858D26 |
| Date: | Mon, 24 Nov 2025 13:31:48 +0100 |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: dynamic conpty loading |
| Message-ID: | <aSRQNNmd5SnL3Iq9@calimero.vinschen.de> |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| 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> | |
| <20251121190433 DOT 4a37dc959848a0aea89a8922 AT nifty DOT ne DOT jp> | |
| <62f3c1ae-1fd9-477d-a837-d865094dab06 AT towo DOT net> | |
| <aSCXcoeDbrGOrUTu AT calimero DOT vinschen DOT de> | |
| <cc6b613b-1c02-41e3-b045-5b1723b706ab AT towo DOT net> | |
| MIME-Version: | 1.0 |
| In-Reply-To: | <cc6b613b-1c02-41e3-b045-5b1723b706ab@towo.net> |
| 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: | Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com> |
| Reply-To: | cygwin AT cygwin DOT com |
| Cc: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
| 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> |
On Nov 21 17:58, Thomas Wolff via Cygwin wrote:
> Am 21.11.2025 um 17:46 schrieb Corinna Vinschen via Cygwin:
> > Hi Thomas,
> >
> > On Nov 21 16:46, Thomas Wolff via Cygwin wrote:
> > > Am 21.11.2025 um 11:04 schrieb Takashi Yano via Cygwin:
> > > > On Sun, 5 Oct 2025 10:15:55 +0200
> > > > Thomas Wolff wrote:
> > > > > > > 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?
> > Where do you expect this conpty.dll to reside?
> >
> > If we do something like that, I would suggest to make sure that this
> > conpty.dll is in a well-defined place. /bin or /lib might be a good
> > idea. And if it exists in this defined place, it will be used by Cygwin.
> >
> > We can tweak the autoload mechanism to allow a primary DLL and a fallback
> > DLL, that drops the need to set the CYWIN env var.
> >
> > The mintty package could contain a post-install script, or some other
> > script in /bin to allow a user with admin rights downloading the latest
> > (or the most sensible) conpty.dll from MSFT.
> >
> > Would that make sense?
> >
> >
> > Corinna
> >
> That makes much sense, yes, thank you. /bin/conpty.dll would probably be a
> good place.
> Thomas
Sorry, but I was mulling over this over the weekend, and I'm not so sure
anymore that this is a good idea. So we're loading a 3rd-party DLL into
our own /bin dir which is not part of the Cygwin distro by a post-install
script. Dubious at best. On top of that, the autoload mechanism is
supposed to make sure the DLLs are autoloaded from system directories
only.
Where exactly is conpty.dll coming from? Does it have a public repo on
github or is it proprietary?
If it's OSS:
- Can we build it ourselves?
- Does it have a license allowing to become part of the distro?
If it's proprietary:
- Is it available from a trusted source?
- Which local dir is it supposed to be installed into per its developers?
It would be better if the conpty.dll is in a system dir as outlined
for the autoload mechanism above. We don't want to rely on proprietary
DLLs autoloaded from an arbitrary dir.
Corinna
--
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |