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 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


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