added Hartmuts KeDetachProcess(); and attach patch for GCC.
authorSteven Edwards <winehacker@gmail.com>
Sun, 7 Apr 2002 09:24:36 +0000 (09:24 +0000)
committerSteven Edwards <winehacker@gmail.com>
Sun, 7 Apr 2002 09:24:36 +0000 (09:24 +0000)
svn path=/trunk/; revision=2826

reactos/ntoskrnl/ob/handle.c

index a62b227..2e8e780 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: handle.c,v 1.35 2002/02/19 00:09:24 ekohl Exp $
+/* $Id: handle.c,v 1.36 2002/04/07 09:24:36 sedwards Exp $
  *
  * COPYRIGHT:          See COPYING in the top level directory
  * PROJECT:            ReactOS kernel
  *
  * COPYRIGHT:          See COPYING in the top level directory
  * PROJECT:            ReactOS kernel
@@ -259,6 +259,7 @@ VOID ObCloseAllHandles(PEPROCESS Process)
                  current->handles[i].ObjectBody = NULL;
                  
                  KeReleaseSpinLock(&HandleTable->ListLock, oldIrql);
                  current->handles[i].ObjectBody = NULL;
                  
                  KeReleaseSpinLock(&HandleTable->ListLock, oldIrql);
+   KeDetachProcess();
                  
                  if ((Header->ObjectType != NULL) &&
                      (Header->ObjectType->Close != NULL))
                  
                  if ((Header->ObjectType != NULL) &&
                      (Header->ObjectType->Close != NULL))
@@ -268,6 +269,7 @@ VOID ObCloseAllHandles(PEPROCESS Process)
                    }
                  
                  ObDereferenceObject(ObjectBody);
                    }
                  
                  ObDereferenceObject(ObjectBody);
+   KeAttachProcess( Process );
                  KeAcquireSpinLock(&HandleTable->ListLock, &oldIrql);
                  current_entry = &HandleTable->ListHead;
                  break;
                  KeAcquireSpinLock(&HandleTable->ListLock, &oldIrql);
                  current_entry = &HandleTable->ListHead;
                  break;