#include <stdlib.h>
#include <stdio.h>
#include <sys/wait.h>
#include <sys/types.h>
int
main()
{
pid_t status = 0;
status = system("mkdir a");
if (-1 != status && WIFEXITED(status) && (WEXITSTATUS(status) == 0))
{
printf("make dir successfully!\n");
}
else
printf("MAKE DIR ERROR\n");
return 0;
}
判断system函数的返回值
最新推荐文章于 2023-04-19 21:15:00 发布