#if !defined(__GNUWIN32__) && !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
#include <direct.h>
-#ifndef __MWERKS__
#include <dos.h>
#endif
-#endif
#if defined(__GNUWIN32__)
#include <sys/unistd.h>
DWORD dwFlags = CREATE_SUSPENDED;
#ifndef __WXWINCE__
+ if ( (flags & wxEXEC_MAKE_GROUP_LEADER) &&
+ (wxGetOsVersion() == wxOS_WINDOWS_NT) )
+ dwFlags |= CREATE_NEW_PROCESS_GROUP;
+
dwFlags |= CREATE_DEFAULT_ERROR_MODE ;
#else
// we are assuming commands without spaces for now