switch(pid = fork()) {
case -1:
fprintf(stderr, "could not fork!");
case 0:
ReDir(inputfile, outputfile, mode);
if(execvp(arg[0], arg) == -1 )
fprintf(stdout, "%s : Unkown command\n", arg[0]);
default:
pid = wait(&status);
}
디렉토리를 나타낼 때 쓰는데 (예:dir -a )화면상에 띄울 때는 문제가 없습니다.
하지만 저기