This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2] Remove socket.S implementation
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: Florian Weimer <fweimer at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 17 Apr 2017 10:45:31 -0300
- Subject: Re: [PATCH v2] Remove socket.S implementation
- Authentication-results: sourceware.org; auth=none
- References: <555E3876.3010805@linaro.org> <93d24842-6fd5-0919-3fed-001970332c35@redhat.com>
On 13/04/2017 17:17, Florian Weimer wrote:
> On 05/21/2015 09:56 PM, Adhemerval Zanella wrote:
>> @@ -72,7 +76,7 @@ accept4 (int fd, __SOCKADDR_ARG addr, socklen_t *addr_len, int flags)
>> /* Try another call, this time with the FLAGS parameter
>> cleared and an invalid file descriptor. This call will not
>> cause any harm and it will return immediately. */
>> - ret = __internal_accept4 (-1, addr, addr_len, 0);
>> + ret = SOCKETCALL_CANCEL (invalid, -1);
>
> I doubt that this can compile. :-/
In fact it compiles fine because we do have SOCKOP_invalid defined:
sysdeps/unix/sysv/linux/socketcall.h:28:#define SOCKOP_invalid -1
>
> I propose to radically simplify this logic and simply require at least kernel version 3.2.18 on ia64, so that we always have either an accept4 system call or an accept4 socket call. I have something approaching a patch for that.
>
> (accept4 support was backported to the 3.2 stable series on ia64 because it was realized that too much broke on ia64 due to the missing support.)
I agree this seems the best approach and I will review your accept4 patch.
>
> Thanks,
> Florian