popen函数

popen执行完后,读取内容 #include <stdio.h> #include <string.h> int main(void) { FILE *fp = NULL; char buf[10240] = {0}; fp = popen(“ls -al”,“r”); if(fp == NULL){ return 0; } fread(buf, 10240, 1, fp); printf("%
相关文章
相关标签/搜索