printf("%s\n",str);
}
pclose(fd);
6.wait()
功能:等待一个子进程返回并修改状态
语法:#include <sys/types.h>
#include <sys/wait.h>
pid_t wait(stat_loc)
int *stat_loc;
说明:允许调用进程取得子进程的状态信息.调用进程将会挂起直到其