Skip to content

Instantly share code, notes, and snippets.

@beelsebob
Created October 31, 2011 21:58
Show Gist options
  • Select an option

  • Save beelsebob/1329144 to your computer and use it in GitHub Desktop.

Select an option

Save beelsebob/1329144 to your computer and use it in GitHub Desktop.
Wraith:Desktop tatd2$ clang -framework Foundation test.m
Wraith:Desktop tatd2$ ./a.out
2011-10-31 21:57:46.840 a.out[916:707] Before
2011-10-31 21:57:46.843 a.out[916:707] After
Wraith:Desktop tatd2$ cat test.m
#import <Foundation/Foundation.h>
int main (int argc, char **argv)
{
@autoreleasepool
{
NSLog(@"Before");
[NSTask launchedTaskWithLaunchPath:@"/bin/sleep" arguments:[NSArray arrayWithObject:@"20"]];
NSLog(@"After");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment