MPW changes

This commit is contained in:
Guido van Rossum 1994-08-29 10:43:12 +00:00
parent 8e1f8dd094
commit ba941eba67
1 changed files with 0 additions and 5 deletions

View 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;
}