[parrot/parrot] be7c67: fix unix domain sockets
GitHub
noreply at github.com
Wed Nov 9 10:57:40 UTC 2016
Branch: refs/heads/master
Home: https://github.com/parrot/parrot
Commit: be7c67495bd0bc0ea9d666d0ad05bf8160bdc27b
https://github.com/parrot/parrot/commit/be7c67495bd0bc0ea9d666d0ad05bf8160bdc27b
Author: Andrew Aldridge <i80and at foxquill.com>
Date: 2016-11-08 (Tue, 08 Nov 2016)
Changed paths:
M include/parrot/platform_interface.h
M src/platform/generic/socket.c
M src/pmc/socket.pmc
M t/pmc/sockaddr.t
M t/pmc/socket.t
Log Message:
-----------
fix unix domain sockets
It's not currently possible to bind an AF_UNIX socket because `getaddrinfo()`
and `getnameinfo()` don't work with AF_UNIX on all platforms.
This patch does the following:
- Fix `getaddrinfo()` error reporting; it works via `gai_strerror()` rather
than `errno`.
- Implement more error checking, preventing possible uninitialized reads if
`getnameinfo()` fails.
- Implement special-cases for `Parrot_io_internal_getaddrinfo()` and
`Parrot_io_internal_getnameinfo()` in the AF_UNIX case; on platforms
without `sys/un.h`, these functions will now return an error if the socket
family is (somehow) AF_UNIX.
- Implement some simple tests for working with Unix sockets.
I couldn't get Parrot compiling with msvc on Windows, so I'm not completely
confident the platform conditional logic is correct.
Commit: 45ec63b6869282b094db80130b2ce28b30149095
https://github.com/parrot/parrot/commit/45ec63b6869282b094db80130b2ce28b30149095
Author: Reini Urban <rurban at cpan.org>
Date: 2016-11-09 (Wed, 09 Nov 2016)
Changed paths:
M include/parrot/platform_interface.h
M src/platform/generic/socket.c
M src/pmc/socket.pmc
M t/pmc/sockaddr.t
M t/pmc/socket.t
Log Message:
-----------
Merge pull request #1233 from i80and/fix-af-unix
fix unix domain sockets
Compare: https://github.com/parrot/parrot/compare/bc456b187e96...45ec63b68692
More information about the parrot-commits
mailing list