Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ba941eb

Browse files
committed
MPW changes
1 parent 8e1f8dd commit ba941eb

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

Python/dup2.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,12 @@ dup2(fd1, fd2)
2020
int fd1, fd2;
2121
{
2222
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
2723
if (fcntl(fd1, F_GETFL) < 0)
2824
return BADEXIT;
2925
if (fcntl(fd2, F_GETFL) >= 0)
3026
close(fd2);
3127
if (fcntl(fd1, F_DUPFD, fd2) < 0)
3228
return BADEXIT;
33-
#endif
3429
}
3530
return fd2;
3631
}

0 commit comments

Comments
 (0)