Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e1f8dd commit ba941ebCopy full SHA for ba941eb
1 file changed
Python/dup2.c
@@ -20,17 +20,12 @@ dup2(fd1, fd2)
20
int fd1, fd2;
21
{
22
if (fd1 != fd2) {
23
-#ifdef MPW
24
- close (fd2); /* XXX RJW MPW does not implement F_GETFL but it does have dup */
25
- fd2 = dup(fd1);
26
-#else
27
if (fcntl(fd1, F_GETFL) < 0)
28
return BADEXIT;
29
if (fcntl(fd2, F_GETFL) >= 0)
30
close(fd2);
31
if (fcntl(fd1, F_DUPFD, fd2) < 0)
32
33
-#endif
34
}
35
return fd2;
36
0 commit comments