This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.


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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]