用popen實現my_system,替代system

int my_system(const char * cmd) { FILE * fp; int res; char buf[1024]; if (cmd == NULL) { printf("my_system cmd is NULL!\n"); return -1; } if ((fp = popen(cmd, "r") ) == NULL) { perror("pope
相關文章
相關標籤/搜索