根據system函數返回值肯定命令是否執行成功

#include <stdio.h> #include <stdlib.h> #include <sys/wait.h> #include <sys/types.h> int system_cmd(char *cmd) { pid_t status; status = system(cmd); if (-1 == status) { print
相關文章
相關標籤/搜索