Changeset 8921 for trunk/src/kernel32/wprocess.cpp
- Timestamp:
- Jul 26, 2002, 12:47:59 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/wprocess.cpp
r8773 r8921 1 /* $Id: wprocess.cpp,v 1.15 6 2002-06-26 07:13:00sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.157 2002-07-26 10:47:59 sandervl Exp $ */ 2 2 3 3 /* … … 465 465 VOID WIN32API ExitProcess(DWORD exitcode) 466 466 { 467 HANDLE hThread = GetCurrentThread(); 468 TEB *teb; 469 467 470 dprintf(("KERNEL32: ExitProcess %d\n", exitcode)); 468 471 dprintf(("KERNEL32: ExitProcess FS = %x\n", GetFS())); … … 473 476 474 477 HMDeviceCommClass::CloseOverlappedIOHandlers(); 478 479 //detach all dlls (LIFO order) before really unloading them; this 480 //should take care of circular dependencies (crash while accessing 481 //memory of a dll that has just been freed) 482 dprintf(("********************************************")); 483 dprintf(("**** Detach process from all dlls -- START")); 484 Win32DllBase::detachProcessFromAllDlls(); 485 dprintf(("**** Detach process from all dlls -- END")); 486 dprintf(("********************************************")); 475 487 476 488 if(WinExe) { … … 485 497 //SvL: We must make sure no threads are still suspended (with SuspendThread) 486 498 // OS/2 seems to be unable to terminate the process otherwise (exitlist hang) 487 TEB *teb = threadList;488 499 threadListMutex.enter(); 500 teb = threadList; 489 501 while(teb) { 490 ResumeThread(teb->o.odin.hThread); 502 if(teb->o.odin.hThread != hThread && teb->o.odin.dwSuspend > 0) { 503 //kill any threads that are suspended; dangerous, but so is calling 504 //SuspendThread; we assume the app knew what it was doing 505 TerminateThread(teb->o.odin.hThread, 0); 506 ResumeThread(teb->o.odin.hThread); 507 } 491 508 teb = teb->o.odin.next; 492 509 } 493 510 threadListMutex.leave(); 494 495 511 496 512 #ifdef PROFILE
Note:
See TracChangeset
for help on using the changeset viewer.