[ClusterLabs Developers] [PATCH] libqb: Add support for GNU/Hurd
Jan Pokorný
jpokorny at redhat.com
Fri Mar 4 15:02:45 UTC 2016
On 02/03/16 17:35 +0100, Svante Signell wrote:
> On Wed, 2016-03-02 at 16:50 +0100, Jan Pokorný wrote:
>> On 02/03/16 14:56 +0100, Svante Signell wrote:
>>> On Wed, 2016-03-02 at 14:25 +0100, Jan Pokorný wrote:
>>>> On 02/03/16 11:21 +0100, Svante Signell wrote:
>>>>> Attached is an updated patch, the previous one was wrong, since GNU/Hurd
>>>>> does
>>>>> not support abstract sockets.
>>>>
>>>> Fix the whitespace error mentioned in-line below first, please.
>>>
>>> Done, new patch attached.
>>
>> I created a separate pull request on your behalf:
>> https://github.com/ClusterLabs/libqb/pull/192
Because of this ML/GH dualism, just wanted to let you know that I
added a comment:
https://github.com/ClusterLabs/libqb/pull/192#issuecomment-192308384
>> with the expectation that the original one is hence obsolete.
>
> Yes, it is now obsolete.
>
>> Or was my understanding that the second original patch is no longer
>> needed just a wrong assumption?
>
> Right, since Linux and Cygwin use abstract sockets, that patch is also obsolete.
>
>> Do you think unlink part is still relevant?
>
> I don't really know, when running the test suite in amd64 with gcc-5.3.1-8, -10
> all tests passes, even ipc.test. However, printing out the bind name as in the
> diff below, all output contains an empty string. Maybe that is due to that path
> names for abstract sockets start with the \0 character?
I suppose so.
> diff --git a/lib/ipc_setup.c b/lib/ipc_setup.c
> index 700de94..6ebe82b 100644
> --- a/lib/ipc_setup.c
> +++ b/lib/ipc_setup.c
> @@ -555,6 +555,7 @@ qb_ipcs_us_publish(struct qb_ipcs_service * s)
>
> res = bind(s->server_sock, (struct sockaddr *)&un_addr,
> QB_SUN_LEN(&un_addr));
> + qb_util_log(LOG_INFO, "qb_ipcs_us_publish:bind(): res=%d,
> un_addr.sun_path='%s'", res, un_addr.sun_path);
> if (res) {
> res = -errno;
> qb_util_perror(LOG_ERR, "Could not bind AF_UNIX (%s)",
> diff --git a/lib/ipc_socket.c b/lib/ipc_socket.c
> index 68ff5e5..f71fbb9 100644
> --- a/lib/ipc_socket.c
> +++ b/lib/ipc_socket.c
> @@ -85,6 +85,7 @@ qb_ipc_dgram_sock_setup(const char *base_name,
> #endif
> res = bind(request_fd, (struct sockaddr *)&local_address,
> sizeof(local_address));
> + qb_util_log(LOG_INFO, "qb_ipc_dgram_sock_setup:bind(): res=%d,
> local_address.sun_path='%s'", res, local_address.sun_path);
> #if !(defined(QB_LINUX) || defined(QB_CYGWIN))
> chmod(local_address.sun_path, 0660);
> chown(local_address.sun_path, -1, gid);
>
--
Jan (Poki)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.clusterlabs.org/pipermail/developers/attachments/20160304/bdff5607/attachment-0002.sig>
More information about the Developers
mailing list