[PATCH] fix native symlink spawn passing wrong arg0
Chris Denton
chris@chrisdenton.dev
Mon Mar 10 15:46:03 GMT 2025
This upstreams the msys2 patch:
https://github.com/msys2/MSYS2-packages/blob/6a02000fd93c6b2001220507e5369a726b6381c4/msys2-runtime/0021-Fix-native-symbolic-link-spawn-passing-wrong-arg0.patch
Original msys2 issue:
https://github.com/msys2/MSYS2-packages/issues/1327
---
winsup/cygwin/spawn.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 06b84236d..b81ccefb7 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -43,7 +43,7 @@ perhaps_suffix (const char *prog, path_conv& buf, int& err, unsigned opt)
err = 0;
debug_printf ("prog '%s'", prog);
- buf.check (prog, PC_SYM_FOLLOW | PC_NULLEMPTY | PC_POSIX, stat_suffixes);
+ buf.check (prog, PC_SYM_FOLLOW | PC_SYM_NOFOLLOW_REP | PC_NULLEMPTY | PC_POSIX, stat_suffixes);
if (buf.isdir ())
{
--
2.48.1.windows.1
More information about the Cygwin-patches
mailing list