Add missing file descriptor to F_DUPFD_CLOEXEC
authorAkira TAGOH <akira@tagoh.org>
Tue, 22 Jan 2013 01:26:41 +0000 (10:26 +0900)
committerAkira TAGOH <akira@tagoh.org>
Tue, 22 Jan 2013 01:26:41 +0000 (10:26 +0900)
Patch from Matthieu Herrb

src/fccompat.c

index 2aa29dd..5ec2135 100644 (file)
@@ -84,7 +84,7 @@ FcMakeTempfile (char *template)
 #  ifdef F_DUPFD_CLOEXEC
     if (fd != -1)
     {
-       int newfd = fcntl(fd, F_DUPFD_CLOEXEC);
+       int newfd = fcntl(fd, F_DUPFD_CLOEXEC, STDIN_FILENO);
 
        close(fd);
        fd = newfd;