develooper Front page | perl.perl5.changes | Postings from September 2019

[perl.git] branch smoke-me/jkeenan/afresh/134446-socket created.v5.31.4-7-g6c468acdd2

From:
James Keenan via perl5-changes
Date:
September 23, 2019 01:54
Subject:
[perl.git] branch smoke-me/jkeenan/afresh/134446-socket created.v5.31.4-7-g6c468acdd2
Message ID:
E1iCDY2-0003AM-Sa@git.dc.perl.space
In perl.git, the branch smoke-me/jkeenan/afresh/134446-socket has been created

<https://perl5.git.perl.org/perl.git/commitdiff/6c468acdd2cd860b78113677dad7615eb218fab7?hp=0000000000000000000000000000000000000000>

        at  6c468acdd2cd860b78113677dad7615eb218fab7 (commit)

- Log -----------------------------------------------------------------
commit 6c468acdd2cd860b78113677dad7615eb218fab7
Author: James E Keenan <jkeenan@cpan.org>
Date:   Sun Sep 22 21:53:05 2019 -0400

    Increment $VERSION to keep porting/cmp_version.t happy

commit a940543ccc04c148e4df8b5696e471f15c912c23
Author: Andrew Hewus Fresh <afresh1@openbsd.org>
Date:   Sun Sep 22 17:36:47 2019 -0700

    Only cache io_socket_proto if protocol is truthy
    
    According to socket(2):
    
        A value of 0 for protocol will let the system select an appropriate
        protocol for the requested socket type.
    
    While linux, and possibly others, return 0 for this, OpenBSD recently
    got support for SO_PROTOCOL in getsockopt(2) and instead of returning
    0, indicating it will choose the correct protocol, it instead returns
    the protocol that was chosen.  That means caching "0" as the chosen
    protocol means that what $sock->protocol returns is not the same as what
    getsockopt($sock, SOL_SOCKET, SO_PROTOCOL) returns.
    
    While there is ongoing discussion about whether returning 0 vs something
    else is correct, the current situation shows that this value is
    implementation specific and we should not cache something that might not
    be right.

-----------------------------------------------------------------------

-- 
Perl5 Master Repository



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About