]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
MPW changes
authorGuido van Rossum <guido@python.org>
Mon, 29 Aug 1994 10:43:12 +0000 (10:43 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 29 Aug 1994 10:43:12 +0000 (10:43 +0000)
Python/dup2.c

index ee1a7ad690d4cd2714b8f11abf5b3d4486c805c5..85ec5d5e5f3332e84cc508c23c6f87261b06ed42 100644 (file)
@@ -20,17 +20,12 @@ dup2(fd1, fd2)
 int fd1, fd2;
 {
        if (fd1 != fd2) {
-#ifdef MPW
-               close (fd2); /* XXX RJW MPW does not implement F_GETFL but it does have dup */
-               fd2 = dup(fd1);
-#else
                if (fcntl(fd1, F_GETFL) < 0)
                        return BADEXIT;
                if (fcntl(fd2, F_GETFL) >= 0)
                        close(fd2);
                if (fcntl(fd1, F_DUPFD, fd2) < 0)
                        return BADEXIT;
-#endif
        }
        return fd2;
 }