Getting Windows "MACHINE SID" without fork() & exec()?

Takeshi Nishimura takeshi.nishimura.linux@gmail.com
Thu Apr 23 17:23:19 GMT 2026


On Thu, Apr 23, 2026 at 7:14 PM William Stewart via Cygwin
<cygwin@cygwin.com> wrote:
>
> On Thu, Apr 23, 2026 at 11:08 AM Takeshi Nishimura wrote:
>
> Does Cygwin have a secret shell variable or /proc file which contains
> > the current machine's MACHINE SID, without having to resort to calling
> > an external program (no fork(), no exec(), please)?
>
>
> I'm not aware of one. What problem are you solving?

Pass MACHINE SID around in a shell script. Doing that by calling
powershell each time is very expensive, around 92% of the scripts
whole runtime
-- 
Internationalization&localization dev / 大阪大学
Takeshi Nishimura <takeshi.nishimura.linux@gmail.com>


More information about the Cygwin mailing list