Changeset 1270 for trunk/dll/arccnrs.c


Ignore:
Timestamp:
Nov 8, 2008, 9:48:24 PM (17 years ago)
Author:
Gregg Young
Message:

Comments and code cleanup for WaitChildThread solution to hang cused by viewer opening before archiver process closes (Ticket 58)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/arccnrs.c

    r1268 r1270  
    5959  25 Aug 08 GKY Check TMP directory space warn if lee than 5 MiB prevent archiver from opening if
    6060                less than 10 KiB (It hangs and can't be closed)
     61  08 Nov 08 GKY Add WaitChildThread to fix hang caused by viewer trying to open a file before
     62                the archiver process closes. (Ticket 58)
    6163
    6264***********************************************************************/
     
    165167WAITCHILD;
    166168
     169// Creates a thread to wait for a child process to complete then posts a message and closes
    167170VOID WaitChildThread(VOID * arg)
    168171{
    169172  WAITCHILD *WaitChild;
    170   ULONG clPosted;
    171173  HAB thab;
    172174  CHAR *filename;
     
    187189      DosWaitEventSem(hWaitChildSem, SEM_INDEFINITE_WAIT);
    188190      priority_bumped();
    189       DosResetEventSem(hWaitChildSem, &clPosted);
    190191      if (IsFile(WaitChild->filename) == 1)
    191192        PostMsg(WaitChild->hwndCnr, UM_ENTER, MPFROMP(filename), MPVOID);
     
    15851586          p++;
    15861587        }
    1587         //printf("%s %d UM_ENTER %s %x\n",__FILE__, __LINE__,WaitChild->filename, dcd->hwndCnr); fflush(stdout);        // 10 Mar 07 SHL hang
    1588         free(s);
     1588        free(s);
    15891589        WaitChild->hwndCnr = dcd->hwndCnr;
    15901590        rc = _beginthread(WaitChildThread, NULL, 65536, WaitChild);
     
    15971597            DosSleep(100);  // Allow unzip session to finish closing 14 Mar 07 SHL
    15981598#endif
    1599           //DosWaitEventSem(hWaitChildSem, SEM_INDEFINITE_WAIT);
    1600           //WinSendMsg(WaitChild->hwndCnr, UM_ENTER, MPFROMP(WaitChild->filename), MPVOID);
     1599          //WinSendMsg(WaitChild->hwndCnr, UM_ENTER, MPFROMP(filename), MPVOID);
    16011600
    16021601      }
Note: See TracChangeset for help on using the changeset viewer.