diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index afc2b3066..1f63e4186 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2011-12-23 Corinna Vinschen + + * pinfo.cc (pinfo_basic::pinfo_basic): Fix formatting. Set uid and gid + to default values to accommodate early initialization of shared user + info. Add comment. + 2011-12-22 Corinna Vinschen * spawn.cc (child_info_spawn::worker): Add CREATE_BREAKAWAY_FROM_JOB diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index e6c62e387..7affe4150 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -36,10 +36,13 @@ public: pinfo_basic(); }; -pinfo_basic::pinfo_basic() +pinfo_basic::pinfo_basic () { pid = dwProcessId = GetCurrentProcessId (); GetModuleFileNameW (NULL, progname, sizeof (progname)); + /* Default uid/gid are needed very early to initialize shared user info. */ + uid = ILLEGAL_UID; + gid = UNKNOWN_GID; } pinfo_basic myself_initial NO_COPY;