On Wed, 17 Dec 2025 15:55:58 +0100 (CET)
Johannes Schindelin wrote:
> Hi Takashi,
> 
> On Wed, 17 Dec 2025, Takashi Yano wrote:
> 
> > After the commit f74dc93c6359, WSL cannot start by distribution name
> > such as debian.exe, which has '.exe' extention but actually is an app
> > execution alias. The commit f74dc93c6359 disables to follow windows
> > reparse point by adding PC_SYM_NOFOLLOW_REP flag in spawn.cc. As a
> > result, is_console_app () returns false for the app execution alias
> > due to open-failure because CreateFileW() cannot open an app execution
> > alias. This patch fixes the issue by converting the path again using
> > PC_SYM_FOLLOW (without PC_SYM_NOFOLLOW_REP) option in path_conv if
> > the path is an app execution alias.
> 
> Since you repeat this commit as the culprit, I guess that this is your way
> to explain to me that before this commit, the standard handles were
> correctly set even after 2533912fc76c (Allow executing Windows Store's
> "app execution aliases", 2021-03-12) allowed executing Microsoft Store
> Apps via their app execution aliases?

Yes. You can see that by just trying cygwin 3.5.7.

> > Fixes: f74dc93c6359 ("fix native symlink spawn passing wrong arg0")
> > Reviewed-by: Johannes Schindelin <[email protected]>
> > Signed-off-by: Takashi Yano <[email protected]>
> > ---
> >  winsup/cygwin/fhandler/termios.cc       | 21 ++++++++++++++++-----
> >  winsup/cygwin/local_includes/fhandler.h |  2 +-
> >  winsup/cygwin/spawn.cc                  |  2 +-
> >  3 files changed, 18 insertions(+), 7 deletions(-)
> > 
> > diff --git a/winsup/cygwin/fhandler/termios.cc 
> > b/winsup/cygwin/fhandler/termios.cc
> > index 19d6220bc..7fdbf6a97 100644
> > --- a/winsup/cygwin/fhandler/termios.cc
> > +++ b/winsup/cygwin/fhandler/termios.cc
> > @@ -702,10 +702,21 @@ fhandler_termios::fstat (struct stat *buf)
> >  }
> >  
> >  static bool
> > -is_console_app (const WCHAR *filename)
> > +is_console_app (path_conv &pc)
> 
> I see you insist of mixing the refactor where `path_conv &` is passed
> instead of `WCHAR *` with the actual fix.
> 
> Not a fan. I regularly hit your commits when bisecting Cygwin runtime
> regressions, and I have not yet learned to be okay with finding patches
> that do too many things at the same time.

Do you mean there should be a separate patch which just change
the argument WCHAR * to path_conv & before the acutual fix?
Doesn't that make the intent of the first commit unclear?

> I'm weven less a fan of the non-descriptive variable name `pc` which
> unnecessarily increases cognitive load.
> 
> But hey, rather than shouting my objections to the form in the void, I'll
> just accept that my recommendations are not welcome,

??? I don't understand why you think so. Which recommendations you mean?

> and this is the shape
> of the patch that you want to have. It does fix the bug, so that's good.

-- 
Takashi Yano <[email protected]>

Reply via email to