* pinfo.h (pinfo::thisproc): Declare. Rename from set_myself.

* pinfo.cc (pinfo::thisproc): Define.  Rename from set_myself.  Set procinfo to
NULL to avoid confusing subsequent init.
(pinfo_init): Accommodate set_myself -> pinfo::thisproc rename.
* dcrt0.cc (child_info_fork::handle_fork): Ditto.
(child_info_spawn::handle_spawn): Ditto.
This commit is contained in:
Christopher Faylor
2008-12-20 17:32:31 +00:00
parent e9982f2a2b
commit 9ac421686a
4 changed files with 25 additions and 16 deletions

View File

@@ -626,7 +626,7 @@ child_info_fork::handle_fork ()
{
cygheap_fixup_in_child (false);
memory_init ();
set_myself (NULL);
myself.thisproc (NULL);
myself->uid = cygheap->user.real_uid;
myself->gid = cygheap->user.real_gid;
@@ -657,7 +657,7 @@ child_info_spawn::handle_spawn ()
!DuplicateHandle (hMainProc, moreinfo->myself_pinfo, hMainProc, &h, 0,
FALSE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE))
h = NULL;
set_myself (h);
myself.thisproc (h);
__argc = moreinfo->argc;
__argv = moreinfo->argv;
envp = moreinfo->envp;