APUE Learning Example Source Code
Guo Wenxue
2018-11-08 d4a286bdfd61be9381b0c5199c0a637b8372df1c
ch1_fileIO/redirect_stdio.c
@@ -14,7 +14,7 @@
    if(fd < 0)
    {
        printf("Open file failure: %s\n", strerror(errno));
        return ;
        return 1;
    } 
    
    dup2(fd, STDIN_FILENO);
@@ -24,5 +24,7 @@
    printf("fd=%d\n", fd); 
    
    close(fd);
    return 0;
}