This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
set FD_CLOEXEC on debug-leaking-scalars sockets
authorZefram <zefram@fysh.org>
Fri, 22 Dec 2017 15:27:19 +0000 (15:27 +0000)
committerZefram <zefram@fysh.org>
Fri, 22 Dec 2017 16:37:51 +0000 (16:37 +0000)
perl.c

diff --git a/perl.c b/perl.c
index a4e0d19..d7df149 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -742,7 +742,7 @@ perl_destruct(pTHXx)
           fail gracefully  */
        int fd[2];
 
-       if(socketpair(AF_UNIX, SOCK_STREAM, 0, fd)) {
+       if(PerlSock_socketpair_cloexec(AF_UNIX, SOCK_STREAM, 0, fd)) {
            perror("Debug leaking scalars socketpair failed");
            abort();
        }