This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin's spawn/exec, mintty and the "Program Compatibility Assistant"


On Feb 16 14:39, Corinna Vinschen wrote:
> On Feb 16 13:15, Andy Koppe wrote:
> > On 16 February 2012 12:46, Corinna Vinschen wrote:
> > > I have still no idea why mintty is affected. ÂIt doesn't show up in the
> > > registry-based PCA database. ÂYesterday I found this on MSDN:
> > > http://msdn.microsoft.com/en-us/library/bb756937.aspx but I don't see
> > > anything there which would explain the effect for mintty. ÂThere's a
> > > section called "Detecting Program Failures Due to Deprecated Windows
> > > Components", maybe that's a hint?
> > [...]
> > > Apart from that, apparently there are multiple other ways to disable PCA
> > > from meddling with mintty. ÂOne of them is the (incorrectly documented)
> > > registry value
> > >
> > > ÂHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\ExecutablesToExclude
> > >
> > > which is a REG_MULTI_SZ value you can fill with full paths to the
> > > exeutables to exclude. ÂI tried that and it actually works. ÂSo, instead
> > > of calling QueryInformationJobObject for each spawn/exec, we could just
> > > add mintty.exe to that registry key.
> > >
> > > Or, alternatively, mintty could come with a builtin manifest. ÂI just
> > > don't know how to include a manifest into a binary...
> > 
> > Mintty already has a manifest, namely the res.mft in its sources, so
> > I'd just need to know what needs to go in there.
> 
> I'm not sure.  Per the articel, it should be sufficient to include an
> "asInvoker" manifest, see the section "Excluding Programs from PCA".

This is not only about the manifest apparently.  I tried to add an
external manifest file to mintty, and first it didn't work, but after a
reboot it was recognized.  At least I think so.

But this only works exactly once.  When I exited mintty and restarted
it, the "Add CREATE_BREAKAWAY_FROM_JOB" debug message reappeared.  Then
I included the external manifest into the internal one and rebuilt
mintty.  After a reboot, same effect.  On first run, everything's ok,
from the second run on, mintty is pressed into PCA's job gang again.

This is what I added to the manifest:

    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
      <security>
	<requestedPrivileges>
	  <requestedExecutionLevel
	    level="asInvoker"
	    uiAccess="false"/>
	  </requestedPrivileges>
	 </security>
    </trustInfo>

I read what I found about PCA, but I didn;t find any hint what the
cause for this weird behaviour could be.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]