mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-04 10:30:47 +00:00
update stable branch to match latest stable release
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/stable@30473 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bcd8f66bdb
commit
4e790ec601
572 changed files with 61797 additions and 51071 deletions
|
@ -1,57 +0,0 @@
|
|||
/* Demonstration of windows NSTask launching bug */
|
||||
|
||||
#include "Foundation/Foundation.h"
|
||||
|
||||
static void
|
||||
handler(NSException *e)
|
||||
{
|
||||
NSLog(@"Caught %@", e);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
CREATE_AUTORELEASE_POOL(arp);
|
||||
|
||||
NSTask *task;
|
||||
NSProcessInfo *info;
|
||||
NSDictionary *env;
|
||||
NSString *path;
|
||||
|
||||
info = [NSProcessInfo processInfo];
|
||||
env = [info environment];
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
path = @"C:\\WINDOWS\\system32\\net.exe";
|
||||
// path = @"E:\\WINNT\\system32\\net.exe";
|
||||
#else
|
||||
path = @"/bin/ls";
|
||||
#endif
|
||||
printf("Determined command to run as '%s'\n",[path lossyCString]);
|
||||
|
||||
task = [NSTask launchedTaskWithLaunchPath: path
|
||||
arguments: [NSArray array]];
|
||||
[task waitUntilExit];
|
||||
|
||||
printf("First task has completed\n");
|
||||
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
path = @"C:\\WINDOWS\\system32\\mem.exe";
|
||||
// path = @"E:\\WINNT\\system32\\mem.exe";
|
||||
#else
|
||||
path = @"/bin/ls";
|
||||
#endif
|
||||
printf("Determined command to run as '%s'\n",[path lossyCString]);
|
||||
|
||||
task = [NSTask launchedTaskWithLaunchPath: path
|
||||
arguments: [NSArray array]];
|
||||
[task waitUntilExit];
|
||||
|
||||
printf("Second task has completed\n");
|
||||
|
||||
NSSetUncaughtExceptionHandler(handler);
|
||||
[NSException raise: NSGenericException format: @"an exception"];
|
||||
|
||||
DESTROY(arp);
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue