AW: [Mono-list] Windows: Propagating exit codes in .bat files?

Jochen Wezel jwezel@compumaster.de
Mon, 3 May 2004 10:03:06 +0200


Hi!

Please pay attention: in Win98, there is no /b parameter available.
A line as EXIT %ERRORLEVEL% exits, but I cannot say if it only exits the =
batch or the COMMAND.COM (that is the intended usage for the /B =
parameter in CMD.EXE)

In Win95, the EXIT command might be missing. I haven't tested, but I =
cannot remember to have seen it.

Another chance for Win9x systems would be to provide .COM files instead =
of .BAT files. But this would need some knowledge on building .COM files =
I haven't got.

Jochen


-----Urspr=FCngliche Nachricht-----
Von: mono-list-admin@lists.ximian.com =
[mailto:mono-list-admin@lists.ximian.com] Im Auftrag von Mike Krueger
Gesendet: Sonntag, 2. Mai 2004 21:07
An: Miguel de Icaza
Cc: mono-list@ximian.com
Betreff: Re: [Mono-list] Windows: Propagating exit codes in .bat files?

Hi

try:
----------
mono mcs.exe
exit /b %ERRORLEVEL%
------------

Regards
Mike

>Hey guys,
>
>   We have an issue with Mono, we are shipping batch files for Windows=20
>like this:
>
>c:\>type mcs.bat
>mono mcs.exe
>c:\>
>
>   The problem is that if `mcs.exe' returns an exitcode different than=20
>zero, the error is not propagated to the caller, so this means that in=20
>Makefiles, things keep going even if there is a failure.
>
>   Anyone knows enough DOS to tell me how to fix that?
>
>Miguel.
>
>_______________________________________________
>Mono-list maillist  -  Mono-list@lists.ximian.com=20
>http://lists.ximian.com/mailman/listinfo/mono-list
>
>
> =20
>


_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com =
http://lists.ximian.com/mailman/listinfo/mono-list