Commit f74dc93
fix native symlink spawn passing wrong arg0
Currently when starting a process from bash via a native symlink, argv[0] is
set to the realpath of the executable and not to the link name. This patch fixes
it so the path of the symlink is seen instead.
The cause is a path conversion in perhaps_suffix which follows native
symlinks. Hence the fix this patch uses is to add PC_SYM_NOFOLLOW_REP when
calling path_conv::check to prevent that.
Fixes: be37165 ("* path.cc (path_conv::check): Don't follow reparse point symlinks if PC_SYM_NOFOLLOW_REP flag is set.")
Signed-off-by: Chris Denton <[email protected]>1 parent 5ec497d commit f74dc93
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
0 commit comments