File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ -(void) taskExample{
6363 dispatch_async (queue, ^{
6464 NSTask *task=[[NSTask alloc ] init ];
6565 [task setExecutableURL: [NSURL fileURLWithPath: @" /bin/sh" ]];
66- [task setArguments: [NSArray arrayWithObjects: @" -c" ,@" ls /Volumes " , nil ]];
66+ [task setArguments: [NSArray arrayWithObjects: @" -c" ,@" open /Applications/iBooks.app " , nil ]];
6767
6868 NSPipe *oPipe=[[NSPipe alloc ] init ];
6969 NSPipe *ePipe=[[NSPipe alloc ]init];
@@ -132,6 +132,7 @@ int main(int argv, const char* argc[]){
132132 NSLog (@" Choice 1: Create a thread and trigger a timer" );
133133 NSLog (@" Choice 2: Execute command line commands from a process" );
134134 scanf (" %i " ,&choice);
135+ // choice=2;
135136 EgClass *inst=[[EgClass alloc ] init ];
136137 if (choice==1 ){ // thread is triggered but not timer, resolve this issue
137138 NSThread *egThread=[[NSThread alloc ] initWithTarget: inst selector: @selector (threadMethod: ) object: NULL ];
You can’t perform that action at this time.
0 commit comments