public inbox for
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: Allow executing Windows Store's "app execution aliases"
@ 2021-03-23 15:58 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2021-03-23 15:58 UTC (permalink / raw)
  To: cygwin-cvs;h=2533912fc76c08af9e386a371fc6b3eb194d56be

commit 2533912fc76c08af9e386a371fc6b3eb194d56be
Author: Johannes Schindelin <>
Date:   Mon Mar 22 16:51:48 2021 +0100

    Cygwin: Allow executing Windows Store's "app execution aliases"
    The Windows Store version of Python (and apparently other Windows Store
    applications) install a special reparse point called "app execution
    alias" into the user's `PATH`.
    These applications can be executed without any problem, but they cannot
    be read as if they were files. This trips up Cygwin's beautiful logic that
    tries to determine whether we're about to execute a Cygwin executable or
    not: instead of executing the application, it will fail, saying
    "Permission denied".
    Let's detect this situation (`NtOpenFile()` helpfully says that this
    operation is not supported on this reparse point type), and simply skip
    the logic: Windows Store apps are not Cygwin executables (and even if
    they were, it is unlikely that they would come with a compatible
    `cygwin1.dll` or `msys-2.0.dll`).
    This fixes
    Signed-off-by: Johannes Schindelin <>

 winsup/cygwin/ | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/winsup/cygwin/ b/winsup/cygwin/
index 7a585392a..ec0cdd408 100644
--- a/winsup/cygwin/
+++ b/winsup/cygwin/
@@ -1276,6 +1276,13 @@ av::setup (const char *prog_arg, path_conv& real_path, const char *ext,
+	  {
+	    /* This is most likely an app execution alias (such as the
+	       Windows Store version of Python, i.e. not a Cygwin program */
+	    real_path.set_cygexec (false);
+	    break;
+	  }
 	if (!NT_SUCCESS (status))
 	    /* File is not readable?  Doesn't mean it's not executable.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-23 15:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23 15:58 [newlib-cygwin] Cygwin: Allow executing Windows Store's "app execution aliases" Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).