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