linux C语言
未_定
这个作者很懒,什么都没留下…
展开
-
linux c通过进程名kill掉进程
#inlcude <stdio.h>#include <sys/types.h>#include <unistd.h>void killprocess(char *processname){ char cmd[128]=""; sprintf(cmd,"kill -9 $(pidof %s)",processname); system(cmd);}main(){ killprocess("process");}通.原创 2020-11-10 16:34:05 · 762 阅读 · 0 评论 -
linux 修改配置文件的c代码
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/types.h>#define HOSTAPDCONFIG_FILE ("./config.txt")#define flen 1024*8int write_hostapdconfig(const char*key,const char*value){ FILE *pf =NULL; char .原创 2020-11-10 15:40:45 · 410 阅读 · 0 评论