Updates for supporting output/error redirect on windows in applications

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@40053 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2016-08-08 16:15:44 +00:00
parent ad38e101cc
commit 99ab6e9a4e

View file

@ -2087,7 +2087,16 @@ description, [cmd stringByDeletingLastPathComponent]);
name: @"GSStartup-GPBS"
object: nil];
#if defined(__MINGW32__)
NSTask *task = AUTORELEASE([NSTask new]);
[task setStandardError:[NSFileHandle fileHandleForWritingAtPath:@"CON"]];
[task setStandardOutput:[NSFileHandle fileHandleForWritingAtPath:@"CON"]];
[task setLaunchPath:cmd];
[task setArguments:args];
[task launch];
#else
[NSTask launchedTaskWithLaunchPath: cmd arguments: args];
#endif
RELEASE(args);
timeoutDate = [NSDate dateWithTimeIntervalSinceNow: 5.0];