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>2002-06-11 06:08:00 +0400
committerChristopher Faylor <me@cgf.cx>2002-06-11 06:08:00 +0400
commit380aaf2d2ced0e305e91c85d8bda2de6092b424f (patch)
treec311aecc9dcc922b138d3d4c12ccd2a0930d325d /winsup/cygwin/dtable.cc
parent85a238e1e8253b37a7ebf960831e75ded21119e5 (diff)
* Makefile.in: Ensure that -MD gets added to CFLAGS regardless of CFLAGS
command-line setting. * cygwin.din: Export sexec* functions as function which returns ENOSYS (i.e., sexec* is deprecated). * dtable.cc (dtable::vfork_child_dup): Ensure that impersonation is restored even on failure. * exec.cc: Throughout, remove references to sexec* and _spawnve. * pinfo.h: Remove _spawnve declaration. * spawn.cc: Rename _spawnve to spawnve and use throughout. (spawn_guts): Eliminate hToken argument and processing of same. Just perform special actions if impersonating. (spawnve): Rename from _spawnve.
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r--winsup/cygwin/dtable.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index 71bf25a17..241528a3d 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -633,14 +633,14 @@ dtable::vfork_child_dup ()
goto out;
}
- /* Restore impersonation */
- if (cygheap->user.impersonated && cygheap->user.token != INVALID_HANDLE_VALUE)
- ImpersonateLoggedOnUser (cygheap->user.token);
-
fds_on_hold = fds;
fds = newtable;
out:
+ /* Restore impersonation */
+ if (cygheap->user.impersonated && cygheap->user.token != INVALID_HANDLE_VALUE)
+ ImpersonateLoggedOnUser (cygheap->user.token);
+
ReleaseResourceLock (LOCK_FD_LIST, WRITE_LOCK | READ_LOCK, "dup");
return 1;
}