Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-08-09 06:33:47 +0400
committerChristopher Faylor <me@cgf.cx>2000-08-09 06:33:47 +0400
commit0072fdab860eb12ab2a454860a8c25ade253de6c (patch)
treefa970886fb81871f5714dbe2734ba91e40a7740a /winsup/cygwin/fork.cc
parentc51a2a8ba4b5d7fa3831303f2bf8611d23b52765 (diff)
* select.cc (allocfd_set): Zero allocated fd_set.
(cygwin_select): Move fd_set copying logic from ::wait to here. Use common return through sell.poll. (select_stuff::wait): Just return success or failure and let caller fill in fd_set. * pinfo.h (pinfo): Eliminate self-referential pointer to sidbuf since pinfo structure exists at random locations now. * fork.cc (fork): Use 'use_psid' element to control when the psid is relevant. * shared.cc (sec_user): Ditto. * spawn.cc (spawn_guts): Ditto. * uinfo.cc (internal_getlogin): Ditto. * syscall.cc (seteuid): Ditto. Set use_psid element.
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r--winsup/cygwin/fork.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 6052bac7f..6dfa83aa5 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -423,9 +423,11 @@ fork ()
forked->process_state |= PID_INITIALIZING |
(myself->process_state & PID_USETTY);
memcpy (forked->username, myself->username, MAX_USER_NAME);
- memcpy (forked->sidbuf, myself->sidbuf, MAX_SID_LEN);
- if (myself->psid)
- forked->psid = forked->sidbuf;
+ if (myself->use_psid)
+ {
+ memcpy (forked->psid, myself->psid, MAX_SID_LEN);
+ forked->use_psid = 1;
+ }
memcpy (forked->logsrv, myself->logsrv, MAX_HOST_NAME);
memcpy (forked->domain, myself->domain, MAX_COMPUTERNAME_LENGTH+1);
forked->token = myself->token;