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

Andy Koppe andy.koppe@gmail.com
Sun Feb 19 06:00:00 GMT 2012


On 17 February 2012 12:18, Corinna Vinschen wrote:
> On Feb 17 11:34, Corinna Vinschen wrote:
>> This is not only about the manifest apparently.  [...]
>
> Nope, this is *ALL* about the manifest, apparently.
>
> I still don't understand what's going on, but I finally puzzled out that
> it's not only mintty.
>
> In fact, if I start *any* self-built console process directly from
> Windows Explorer I find the process being part of a PCA job!  If I
> start CMD first, and then the console application from there, there'
> no job object involved.
>
> This is NOT Cygwin-only.  This also occurs with self-built non-Cygwin
> (mingw) applications.  And what's even more puzzeling is the fact that
> adding an "asInvoker" manifest, internal or external, doesn't help
> anything...
>
> On W7!  On Vista, the manifest helps.
>
> Some more digging on MSDN turned up two interesting blogs from a guy
> calling himself "the App Compat Guy":
>
> First, here's the blog entry which describes why this doesn't work on
> W7.  It's a funny one, since he's not very happy with what happens on
> W7, apparently:
>
> http://blogs.msdn.com/b/cjacks/archive/2009/06/18/pca-changes-for-windows-7-how-to-tell-us-you-are-not-an-installer-take-2-because-we-changed-the-rules-on-you.aspx
>
> While he talks about installers, the "per OS" manifest problem
> apparently applies to all apps.
>
> The second blog entry tells how to drop off from a PCA job:
>
> http://blogs.msdn.com/b/cjacks/archive/2009/07/10/how-to-work-around-program-compatibility-assistant-pca-jobobjects-interfering-with-your-jobobjects.aspx
>
> Well, that's pretty much exactly what we're doing in Cygwin's spawn/exec
> code now.
>
> Bottom line:
>
> - From observation I assume that it's all about having a runlevel manifest
>  or not.  On W7 the binary additionally needs a special W7 compatible
>  manifest.
>
> - Console applications are only affected when started directly from the
>  GUI.  If they are started from a correctly-manifested console app (CMD),
>  they and their children are not affected anymore.
>
> - So we would have to create all executables with a W7-compatible
>  manifest.  That is quite certainly not an option.
>
> - So we have to keep the CREATE_BREAKAWAY_FROM_JOB stuff in Cygwin
>  for the time being.

Sorry to be a bit dense, but does this mean for mintty? Do I need to
add something to the manifest, and if so, how urgent is it?

Andy



More information about the Cygwin-developers mailing list