[PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.
Corinna Vinschen
corinna-cygwin@cygwin.com
Thu Oct 24 13:33:00 GMT 2019
On Oct 24 19:17, Takashi Yano wrote:
> 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.
In mine, too. This does not occur w/o running script.
> > 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 ());
Why don't you use operator cygpsid::== as outlined above? That's what
it's made for :)
Corinna
--
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20191024/6877db44/attachment.sig>
More information about the Cygwin-patches
mailing list