摘要:
// 使用popen代替system函数 int my_system(const char * cmd) { FILE * fp; int res;if (cmd == NULL) { printf("my_system cmd is NULL!\n"); return -1; } if ((fp 阅读全文
posted @ 2021-02-02 15:46
insistYuan
阅读(969)
评论(0)
推荐(0)
摘要:
今天在写程序的时候,需要用到system函数,早就知道system函数存在使用风险,但是只知其然不知其所以然,好在早有大佬研究过了,以下转自:https://blog.csdn.net/u011006622/article/details/77643680 留作记录,以便查询。 这几天调程序(嵌入式 阅读全文
posted @ 2021-02-02 15:38
insistYuan
阅读(301)
评论(0)
推荐(0)
摘要:
1 #include <stdbool.h> 2 #include <sys/types.h> 3 #include <sys/stat.h> 4 #include <unistd.h> 5 6 bool file_exist(const char *path) // 返回值:0 - 不存在, 1 阅读全文
posted @ 2021-02-02 10:18
insistYuan
阅读(532)
评论(0)
推荐(0)

浙公网安备 33010602011771号