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