Commit cf0d96a
Cygwin: termios: Handle app execution alias in is_console_app()
After the commit f74dc93, WSL cannot start by distribution name
such as debian.exe, which has '.exe' extention but actually is an app
execution alias. This is because the commit f74dc93 disabled to
follow windows reparse point by adding PC_SYM_NOFOLLOW_REP flag in
spawn.cc, that path is used for sapwning a process. As a result, the
path, that is_console_app () received, had been the reparse point of
app execution alias, then it returned false for the the path due to
open-failure because CreateFileW() cannot open an app execution alias,
while it can open normal reparse point. If is_console_app() returns
false, standard handles for console app (such as WSL) would not be
setup. This causes that the console input cannot be transfered to the
non-cygwin app.
This patch fixes the issue by locally converting the path, which is
a path to the app execution alias, once again using PC_SYM_FOLLOW
(without PC_SYM_NOFOLLOW_REP) option path_conv for using inside of
is_console_app() to resolve the reparse point here, if the path is
an app execution alias.
Fixes: f74dc93 ("fix native symlink spawn passing wrong arg0")
Reviewed-by: Johannes Schindelin <[email protected]>
Signed-off-by: Takashi Yano <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>1 parent 284feb0 commit cf0d96a
File tree
3 files changed
+20
-7
lines changed- winsup/cygwin
- fhandler
- local_includes
3 files changed
+20
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
702 | 702 | | |
703 | 703 | | |
704 | 704 | | |
705 | | - | |
| 705 | + | |
706 | 706 | | |
707 | | - | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
708 | 712 | | |
709 | 713 | | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
710 | 723 | | |
711 | | - | |
| 724 | + | |
712 | 725 | | |
713 | 726 | | |
714 | 727 | | |
| |||
761 | 774 | | |
762 | 775 | | |
763 | 776 | | |
764 | | - | |
| 777 | + | |
765 | 778 | | |
766 | 779 | | |
767 | 780 | | |
| |||
800 | 813 | | |
801 | 814 | | |
802 | 815 | | |
803 | | - | |
| 816 | + | |
804 | 817 | | |
805 | 818 | | |
806 | 819 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2035 | 2035 | | |
2036 | 2036 | | |
2037 | 2037 | | |
2038 | | - | |
| 2038 | + | |
2039 | 2039 | | |
2040 | 2040 | | |
2041 | 2041 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
582 | | - | |
| 582 | + | |
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
| |||
0 commit comments