Ignore:
Timestamp:
Mar 4, 2000, 8:52:37 PM (25 years ago)
Author:
sandervl
Message:

DosOpen (file handle error) & dll destruction bugfixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/wprocess.cpp

    r2984 r3005  
    1 /* $Id: wprocess.cpp,v 1.70 2000-03-03 11:16:00 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.71 2000-03-04 19:52:37 sandervl Exp $ */
    22
    33/*
     
    344344//******************************************************************************
    345345//******************************************************************************
    346 static void _System Win32DllExitList(ULONG reason)
    347 {
    348   dprintf(("Win32DllExitList %d\n", reason));
    349 
    350   if(WinExe) {
    351     delete(WinExe);
    352     WinExe = NULL;
    353   }
    354   return;
    355 }
    356 //******************************************************************************
    357 //******************************************************************************
    358346VOID WIN32API ExitProcess(DWORD exitcode)
    359347{
     
    363351  SetOS2ExceptionChain(-1);
    364352
    365   Win32DllExitList(0);
    366 
    367   //Note: Needs to be done after Win32DllExitList (destruction of exe + dll objects)
     353  if(WinExe) {
     354        delete(WinExe);
     355        WinExe = NULL;
     356  }
     357
     358  //Note: Needs to be done after deleting WinExe (destruction of exe + dll objects)
    368359  //Flush and delete all open memory mapped files
    369360  Win32MemMap::deleteAll();
     
    458449            peldrDll->setNoEntryCalls();
    459450        }
     451        //Set flag so this dll doesn't get automatically deleted in ExitProcess
     452        //(the first time); give application the chance to free it first
     453        //If it's not freed, we delete it the 2nd time in ExitProcess
     454        peldrDll->SetDynamicallyLoaded();
    460455
    461456        if(peldrDll->attachProcess() == FALSE) {
Note: See TracChangeset for help on using the changeset viewer.