Created
March 21, 2013 15:19
-
-
Save jontelang/5213847 to your computer and use it in GitHub Desktop.
kill pid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if( [a isRunning] ) | |
{ | |
int pid = [a pid]; | |
NSLog(@"pid: %i", pid); | |
NSString *cmd = [NSString stringWithFormat:@"kill %i",pid]; | |
NSLog(@"%@",cmd); | |
const char *command = [cmd UTF8String]; | |
NSLog(@"%s",command); | |
int result = system(command); | |
NSLog(@"%i",result); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment