Use hMainProc where appropriate, throughout.

* environ.cc (spenv::retrieve): Add debugging statements.
* pinfo.cc (set_myself): Don't call strace.hello if already stracing.
* strace.cc (strace): Move NO_COPY keyword so that it will actually take
effect.
This commit is contained in:
Christopher Faylor
2002-06-19 15:27:27 +00:00
parent 834224ab85
commit 03a2ce9a36
9 changed files with 112 additions and 86 deletions

View File

@@ -43,8 +43,7 @@ internal_getlogin (cygheap_user &user)
/* Try to get the SID either from current process and
store it in user.psid */
if (!OpenProcessToken (GetCurrentProcess (),
TOKEN_ADJUST_DEFAULT | TOKEN_QUERY,
if (!OpenProcessToken (hMainProc, TOKEN_ADJUST_DEFAULT | TOKEN_QUERY,
&ptok))
system_printf ("OpenProcessToken(): %E\n");
else if (!GetTokenInformation (ptok, TokenUser, &tu, sizeof tu, &siz))