From 6c2b7846124572ffed3ce4fea074cc89e732651c Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 1 Dec 2003 15:03:43 +0000 Subject: * cygheap.cc (cygheap_init): Set cygheap->shared_prefix. * cygheap.h (struct init_cygheap): Add shared_prefix. * shared.cc (shared_name): Use cygheap->shared_prefix. --- winsup/cygwin/cygheap.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'winsup/cygwin/cygheap.cc') diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index ede408695..6859e4335 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -206,6 +206,12 @@ cygheap_init () cygheap->fdtab.init (); if (!cygheap->sigs) sigalloc (); + if (!cygheap->shared_prefix) + cygheap->shared_prefix = cstrdup ( + wincap.has_terminal_services () + && (set_process_privilege (SE_CREATE_GLOBAL_NAME, true) >= 0 + || GetLastError () == ERROR_NO_SUCH_PRIVILEGE) + ? "Global\\" : ""); } /* Copyright (C) 1997, 2000 DJ Delorie */ -- cgit v1.2.3