Skip to content

Instantly share code, notes, and snippets.

@oneamtu oneamtu/gist:1053256
Created Jun 29, 2011

Embed
What would you like to do?
a roundabout kill command using a call to system()
FILE *output = popen("su -c 'cat /var/lock/naoqi.lock'", "r");
char buffer[256];
fgets(buffer, sizeof(buffer), output);
char command[256] = "kill -9 ";
strcat(command, buffer);
printf("command %s\n", command);
system(command);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.