[Bug 9849] New: in win16 apps, exit status is lost, and always reported as 0

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Sep 30 22:06:10 CDT 2007


http://bugs.winehq.org/show_bug.cgi?id=9849

           Summary: in win16 apps, exit status is lost, and always reported
                    as 0
           Product: Wine
           Version: 0.9.45.
          Platform: Other
        OS/Version: other
            Status: NEW
          Keywords: download, source
          Severity: normal
          Priority: P2
         Component: wine-dos
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: dank at kegel.com


Simple win16 programs that just terminate with nonzero
status do so properly on winxp, but on wine, wine terminates
with zero status.  
This is easy to test with openwatcom and a trivial C program, e.g.

#include <stdlib.h>
#include <unistd.h>

extern void myexit( void );
#pragma aux myexit = \
     "mov ax,4c01h"   \
     "int 21h"        

int main()
{
        /*exit(1);
        _exit(1);
        __exit(1);*/
        myexit();
        return 1;
}

I compiled this with the overly complicated commandline

wine wcc '-i=C:\WATCOM\h\win;C:\WATCOM\h'-zW -e25 -zq -od -d2 -bw-bt=windows 
foo.c
wine wlink file foo.obj

To test, do
  wine foo.exe
  echo $?

It should output 1, but it outputs 0.


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list