Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Use ngx_socket_errno where appropriate.

January 31, 2014 12:40AM
On Jan 31, 2014, at 8:35 , Ruslan Ermilov wrote:

> Hi Piotr,
>
> On Thu, Jan 30, 2014 at 04:16:04PM -0800, Piotr Sikora wrote:

[ ... ]

> These seem questionable to me because the ioctl/fcntl calls are
> known to report back in errno, and they're not wrapped into ngx_foo()
> calls here.
>
> My own preferences are as follows.
>
> Use "ngx_errno" if we directly call ioctl/fcntl from the UNIX context.
> I'd even prefer using "errno" here, but that doesn't seem to agree
> with the current code. Still, some code uses "errno" here, and that
> perhaps should be fixed as well.
>
> Use "ngx_socket_errno" for socket-related calls, including wrappers
> such as ngx_nonblocking() known to apply to exclusively to sockets.

Yes, ngx_socket_errno should used only for socket-related calls and
only in cross-plarform parts which can be compiled on no-Unix platform
(that is on Windows).


--
Igor Sysoev
http://nginx.com

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Use ngx_socket_errno where appropriate.

Piotr Sikora 1208 January 30, 2014 07:18PM

Re: [PATCH] Use ngx_socket_errno where appropriate.

Ruslan Ermilov 762 January 30, 2014 11:36PM

Re: [PATCH] Use ngx_socket_errno where appropriate.

Igor Sysoev 974 January 31, 2014 12:40AM

Re: [PATCH] Use ngx_socket_errno where appropriate.

Maxim Dounin 1177 January 31, 2014 06:40AM

Re: [PATCH] Use ngx_socket_errno where appropriate.

Piotr Sikora 464 January 31, 2014 03:54PM

Re: [PATCH] Use ngx_socket_errno where appropriate.

Maxim Dounin 371 February 04, 2014 09:34AM

Re: [PATCH] Use ngx_socket_errno where appropriate. Attachments

Piotr Sikora 556 February 04, 2014 09:34AM

Re: [PATCH] Use ngx_socket_errno where appropriate.

Ruslan Ermilov 411 February 05, 2014 08:12AM

Re: [PATCH] Use ngx_socket_errno where appropriate.

Maxim Dounin 427 February 05, 2014 10:22AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 176
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready