TeX-Live / texlive-source

source part of the TeX Live subversion repository - for issues please contact the tex-k mailing list at tug.org
257 stars 67 forks source link

Don't ignore fgets and dup return value. #7

Closed ascherer closed 5 years ago

ascherer commented 5 years ago

What would happen if fgets() fails?

ascherer commented 5 years ago

From Code Wiki:

if (dup(outputfd) != STDOUT_FILENO) {
        perror("dup(2)");
        close(outputfd); /*N.B. Remember to close your files!*/
        exit(EXIT_FAILURE);
    }

for tex-make.c thrice.

ascherer commented 5 years ago

Fixed upstream.