* times.cc (hires::prime): Restore thread priority on failure condition.

* uinfo.cc (uinfo_init): Use more robust method for determining if process was
invoked from a non-cygwin process.
* sync.h (muto::init): Eliminate "inheritance" parameter.
(new_muto): Reflect removal of parameter.
* sync.cc (muto::init): Ditto.
* cygheap.cc (cygheap_init): Ditto.
* debug.cc (threadname_init): Ditto.
* exceptions.cc (events_init): Ditto.
* malloc.cc (malloc_init): Ditto.
* path.cc (cwdstuff::init): Ditto.
* sigproc.cc (sigproc_init): Ditto.
* grp.cc (group_lock): Use different method for locking with static member.
(read_etc_group): REALLY ensure that read lock mutex is released.
* passwd.cc (passwd_lock): Use different method for locking with static member.
(read_etc_passwd): REALLY ensure that read lock mutex is released.
* shared.cc (sec_user): Correct reversed inheritance test.
This commit is contained in:
Christopher Faylor
2002-02-17 04:59:55 +00:00
parent 9490dffa7b
commit 2bd22312df
14 changed files with 67 additions and 33 deletions

View File

@@ -257,7 +257,7 @@ uinfo_init ()
myself->uid = p->pw_uid;
/* Set primary group only if process has been started from a
non cygwin process. */
if (myself->ppid == 1)
if (!myself->ppid_handle)
myself->gid = p->pw_gid;
}
else
@@ -277,7 +277,7 @@ getlogin (void)
#ifdef _MT_SAFE
char *this_username=_reent_winsup ()->_username;
#else
static NO_COPY char this_username[UNLEN + 1];
static char this_username[UNLEN + 1] NO_COPY;
#endif
return strcpy (this_username, cygheap->user.name ());