Jason Edmeades : cmd.exe: Support return code if fail to launch program.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Feb 21 06:01:09 CST 2007


Module: wine
Branch: master
Commit: 3bdb64149b9d89449a43757f298f33f53f636af9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3bdb64149b9d89449a43757f298f33f53f636af9

Author: Jason Edmeades <us at edmeades.me.uk>
Date:   Tue Feb 20 18:03:32 2007 +0000

cmd.exe: Support return code if fail to launch program.

---

 programs/cmd/wcmdmain.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index 8077fb8..fa17d93 100755
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -662,6 +662,9 @@ char filetorun[MAX_PATH];
   }
   if (!status) {
     WCMD_print_error ();
+    /* If a command fails to launch, it sets errorlevel 9009 - which
+       does not seem to have any associated constant definition     */
+    errorlevel = 9009;
     return;
   }
   if (!console) errorlevel = 0;




More information about the wine-cvs mailing list