[PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.
Takashi Yano
takashi.yano@nifty.ne.jp
Thu Oct 24 10:17:00 GMT 2019
On Thu, 24 Oct 2019 11:38:17 +0200
Corinna Vinschen wrote:
> Well, what I see when starting cmd.exe with this patch is a short
> flicker in the existing output in mintty, but the cursor position
> stays the same. and cmd.exe output is where you'd expect it.
I mean:
1) start mintty
2) ps
3) script
4) cmd
In my environment, output of ps command disappears.
> If it's running as Local System (actually SYSTEM), it should have
> the user SID S-1-5-18. You can just check this with
>
> cygheap->user.saved_sid () == well_known_system_sid
Thanks for the advice. Now I have confirmed the following code
works as expected.
inline static bool
is_running_as_service (void)
{
return check_token_membership (well_known_service_sid)
|| RtlEqualSid (well_known_system_sid, cygheap->user.saved_sid ());
}
--
Takashi Yano <takashi.yano@nifty.ne.jp>
More information about the Cygwin-patches
mailing list