* fhandle.h (fhandler_pipe::create_guard): Revert change which eliminated

SECURITY_ATTRIBUTES argument.
* pipe.cc (fhandler_pipe::open): Duplicate guard from other process and protect
it appropriately.  Eliminate unneeded writepipe_exists temporary variable.  Set
inheritance appropriately.
(fhandler_pipe::set_close_on_exec): Revert change which eliminated handling
guard inheritance.
(fhandler_pipe::fixup_after_fork): Ditto.  Use correct name of entity being
checked by fork_fixup.
(fhandler_pipe::fixup_after_exec): Don't bother with guard here.
(fhandler_pipe::dup): Cosmetic changes and revert creation of writepipe_exists
as noninheritable.
(fhandler_pipe::create): Revert change which eliminated SECURITY_ATTRIBUTES
argument.  Revert change which always made writepipe_exists noninheritable.
This commit is contained in:
Christopher Faylor
2006-05-21 21:02:52 +00:00
parent 9c9959a512
commit 8ae1d98d8e
3 changed files with 64 additions and 32 deletions

View File

@ -513,11 +513,11 @@ public:
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
int open (int flags, mode_t mode = 0);
int close ();
void create_guard ()
{
guard = CreateMutex (&sec_none, FALSE, NULL);
ProtectHandleINH (guard);
}
void create_guard (SECURITY_ATTRIBUTES *sa)
{
guard = CreateMutex (sa, FALSE, NULL);
ProtectHandleINH (guard);
}
int dup (fhandler_base *child);
int ioctl (unsigned int cmd, void *);
void fixup_in_child ();