From 1d5afb8039f02dbcabc6b0b0d55bab52e283be29 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Sat, 29 May 2010 09:23:23 +0000 Subject: [PATCH] [CRT] fix behavior of _system (fixes msvcrt environ winetest) svn path=/trunk/; revision=47403 --- reactos/lib/sdk/crt/process/_system.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/reactos/lib/sdk/crt/process/_system.c b/reactos/lib/sdk/crt/process/_system.c index f6173db03c6..3f9712b5737 100644 --- a/reactos/lib/sdk/crt/process/_system.c +++ b/reactos/lib/sdk/crt/process/_system.c @@ -35,11 +35,14 @@ int system(const char *command) // system should return 0 if command is null and the shell is found if (command == NULL) { - if (szComSpec == NULL) - return 0; - else - return -1; - } + if (szComSpec == NULL) + return 0; + else + return 1; + } + + if (szComSpec == NULL) + return -1; // should return 127 or 0 ( MS ) if the shell is not found // __set_errno(ENOENT);