On Mon, 18 Nov 2024, Corinna Vinschen wrote:

> Neat, but if this only affects the ARM64 emulation, shouldn't this only
> be called under wincap.cpu_arch() == PROCESSOR_ARCHITECTURE_AMD64?

Wouldn't this always be true though?  (Except that I backported this to
3.3.6 for i686 support, where I'd have to check for that possibility as
well).  Is this just to avoid the code when a native ARM64 Cygwin appears?

I have been sort of considering if the results from IsWow64Process2 should
be cached in wincap, then we could check that here if we are running on
ARM64 under emulation, and also used the cached value in the check around
FAST_CWD.  In addition, I was thining it might make sense to include this
info in `uname -s` like -WOW64 used to be when i686 was supported.

> A one-line comment explain why ERROR_OPERATION_ABORTED is exempt from
> the debug message might be helpful here.

OK (if I can limit myself to one line ;))

> > -       chld_procs[i].wait_thread->terminate_thread ();
> > +       if (!CancelSynchronousIo (chld_procs[i].wait_thread->thread_handle 
> > ()))
>
> This expression should be bracketed.  But actually, can you just change
> this to
>
>    if (chld_procs[i].wait_thread
>        && CancelSynchronousIo())
> please?  And another comment might be helpful here, too.

OK

Reply via email to