Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Exit status not reported from 16-bit apps

Closed / Fixed218692ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:04:11
OriginalBugID: 1760 Bug
Version: 8.0.5
SubmitDate: '1999-04-08'
LastModified: '2000-10-25'
Severity: MED
Status: Released
Submitter: pat
OS: Windows 98
Machine: X86
FixedDate: '1999-04-19'
FixedInVersion: 8.1
ClosedDate: '2000-10-25'


Name:

Mark Mitchell



ReproducibleScript:

Invoke a 16-bit app under Windows95 with "exec foo".  The exit status

    is always reported as zero, regardless of how the program actually

    exits.  The fix is to have the `tclpip80.dll' helper application exit

    with the 

    status of the 16-bit app.



Patch:

*** stub16.c~Mon Sep 14 11:40:20 1998

--- stub16.cThu Apr 08 01:12:12 1999

***************

*** 132,140 ****

  

      WaitForInputIdle(pi.hProcess, 5000);

      WaitForSingleObject(pi.hProcess, INFINITE);

      CloseHandle(pi.hProcess);

      CloseHandle(pi.hThread);

-     result = 0;

  

      if (hFileOutput != INVALID_HANDLE_VALUE) {

  SetFilePointer(hFileOutput, 0, 0, FILE_BEGIN);

--- 132,140 ----

  

      WaitForInputIdle(pi.hProcess, 5000);

      WaitForSingleObject(pi.hProcess, INFINITE);

+     GetExitCodeProcess(pi.hProcess, &result);

      CloseHandle(pi.hProcess);

      CloseHandle(pi.hThread);

  

      if (hFileOutput != INVALID_HANDLE_VALUE) {

  SetFilePointer(hFileOutput, 0, 0, FILE_BEGIN);



PatchFiles:

stub16.c





4/19/99 - redman - applied patch for 8.1.0.
welch Closed ticket [218692ffff]. [History diff]2000-10-26 08:27:11
dgp Ticket [218692ffff]: 3 changes [History diff]2001-04-21 03:42:33
Log in (anonymous is fine) to add a comment.