Open axfelix opened 5 years ago
I suppose you should ask the author of win-sudo.
Fair enough! I figured it would be easier for you to look at the way it's being wrapped rather than for them to anticipate how ConEmu works, but -- any interest, @imachug ?
Will look into it.
The left terminal is ConEmu that runs bash
, the right one is cmd that runs bash
as well. I typed echo $$
to ConEmu, it echoed 11216. Then I typed echo $$
to cmd, it echoed 6856. However, if I run cat /proc/11216/fd/0
, it starts echoing the current terminal, not the terminal with ID 11216. Same happens if I run cat /proc/6856/fd/0
-- typing data into the terminal makes it appear only in that terminal.
Sounds like a bug with attaching process IDs to consoles. @Maximus5
What is bash from? WSL/MinGW? I see MinGW in the prompt. How did you run bash on the left and on the right?
I suppose you know, that mingw works differently when started from conhost (directly, bash.exe from Win+R) and from mintty. The same with ConEmu - directly and via connector.
MinGW in my case too. And I start ConEmu directly (in that I have it pinned to my taskbar and it defaults to MinGW/Git Bash).
What is bash from? WSL/MinGW? I see MinGW in the prompt.
Yes, it's MinGW (more specifically, git bash).
How did you run bash on the left and on the right?
Started C:\Program Files\Git\bin\bash.exe
(or whatever the correct path is).
I suppose you know, that mingw works differently when started from conhost (directly, bash.exe from Win+R) and from mintty. The same with ConEmu - directly and via connector.
Hm, will check.
UPD: Turns out that opening classic Git Bash, running winpty bash
and then sudo echo 1
doesn't really echo anything -- sounds like it could be the problem. Will I just have to conclude that I can't make it work with connectors?
Maybe not until/if ConEmu decides to adopt https://blogs.msdn.microsoft.com/commandline/2018/08/02/windows-command-line-introducing-the-windows-pseudo-console-conpty/ ?
@axfelix Yup, sounds like what we need. It would be awesome if ConEmu used this feature. @Maximus5
@Maximus5 Just a quick question, have you changed anything regarding this issue? Seems like it was resolved (see the referenced issue), however I don't think there were any big changes since Dec 16.
I just bumped my ConEmu to 190108 and it still doesn't seem to be working, should I bump my Git bash as well? I wouldn't think that would effect it...
https://github.com/imachug/win-sudo seems not to work under ConEmu (it works when running Git bash directly), presumably because it has to do weird stuff to capture another terminal process. Is this fixable?