Skip to content

Instantly share code, notes, and snippets.



Created Jun 29, 2011
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);
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.