CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.
TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | BSD |
ReleasedLast Release | Dec 2014 |
Maintained by Mark Aufflick.
This is a fork of Peter Hosey's Mercurial repo, with a fix for this bug.
A replacement for NSTask. Should be drop-in for most (eventually all) purposes.
If there's anything in NSTask that this doesn't implement that you need, please file a request in the issue tracker. If you implement it yourself, please send in a patch.
From the test program:
PRHTask *task = [PRHTask taskWithProgramName:@"echo" arguments:@"I am the very model of a modern Major-General", nil];
task.accumulatesStandardOutput = YES;
task.successfulTerminationBlock = ^(PRHTask *completedTask) {
NSLog(@"Completed task: %@ with exit status: %i", completedTask, completedTask.terminationStatus);
NSLog(@"Accumulated output: %@", [task outputStringFromStandardOutputUTF8]);
};
task.abnormalTerminationBlock = ^(PRHTask *completedTask) {
NSLog(@"Task exited abnormally: %@ with exit status: %i", completedTask, completedTask.terminationStatus);
};
[task launch];
Some of NSTask's features aren't implemented yet. (You can help!) These include: