From 5fc90066d16fe0d0a69d1a8bcc8acbe64a4d8c74 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Mon, 20 Jan 2003 17:37:35 +0000 Subject: [PATCH] Retract #18154 (integrate of perlio #18507), not enough threadsafety. p4raw-id: //depot/perl@18521 --- perlio.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/perlio.c b/perlio.c index 2d5785b..de6950b 100644 --- a/perlio.c +++ b/perlio.c @@ -2708,13 +2708,6 @@ PerlIOStdio_close(pTHX_ PerlIO *f) } else { /* Tricky - must fclose(stdio) to free memory but not close(fd) */ -#ifdef USE_THREADS - /* Sarathy pointed out that another thread could reuse - fd after fclose() but before we dup2() below - so take out a MUTEX to shut them out - */ - MUTEX_LOCK(&PerlIO_mutex); -#endif dupfd = PerlLIO_dup(fd); } } @@ -2732,14 +2725,12 @@ PerlIOStdio_close(pTHX_ PerlIO *f) /* We need to restore fd from the saved copy */ if (PerlLIO_dup2(dupfd,fd) != fd) result = -1; -#ifdef USE_THREADS - MUTEX_UNLOCK(&PerlIO_mutex); -#endif if (PerlLIO_close(dupfd) != 0) result = -1; } return result; } + } -- 2.7.4