Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#include <stdio.h>
int main (void) {
FILE *fp;
int pid;
char pidstr[10];
char kill_line[50] = "kill ";
if ((fp = popen("ps | grep login", "r")) == NULL) {
printf("didn't work\n");
exit(1);
}
fscanf(fp, "%d", &pid);
sprintf(pidstr, "%d", pid);
strcat(kill_line, pidstr);
printf("%s\n", kill_line);
if (system(kill_line)) {
printf("didn't work\n");
}
return 0;
}