| Store | Cart

[perl #130851] [PATCH] socket SOCK_CLOEXEC

From: James E Keenan via RT <perl...@perl.org>
Sun, 26 Feb 2017 13:31:55 -0800
On Fri, 24 Feb 2017 13:12:12 GMT, alex...@gmx.net wrote:
> This is a bug report for perl from alex...@gmx.net,> generated with the help of perlbug 1.40 running under perl 5.25.11.> > > -----------------------------------------------------------------> [Please describe your issue here]> > When analyzing system calls, I found that Perl socket always does> an additional fcntl(F_SETFD,FD_CLOEXEC).  Modern socket(2) syscalls> support the SOCK_CLOEXEC flag to do this atomically.  In general> this avoids a threading race, I did it to save the additional> syscall.  I had to add logic for socket descriptor 0, 1, 2, but> this case should not happen in practice.> > I know that my patch is only a micro optimization, but it should> not do any harm.> > I have startet to implement this for socket(2).  If you agree that> this is useful, I will also do it for similar operations.  I have> started a new test file t/io/cloexec.t so I can add other cases> later.> > To get all tests pass, I had to adjust my email in AUTHORS> 

Given code freeze, I'm marking this ticket and its patch for consideration post-5.26.0 release.

Thank you very much.

-- 
James E Keenan (jkee...@cpan.org)

Recent Messages in this Thread
Alexander Bluhm (via RT) Feb 24, 2017 01:12 pm
Zefram Feb 24, 2017 10:23 pm
Zefram Feb 25, 2017 03:36 am
James E Keenan via RT Feb 26, 2017 09:31 pm
James E Keenan via RT Jun 01, 2017 03:27 pm
Messages in this thread