Welcome! Log In Create A New Profile

Advanced

Re: Why not remove UNIX domain socket before bind

Shuxin Yang
November 30, 2016 11:32AM
Hi, Maxim:

Thank you very much ! I think b) is good reason, a) is pretty weak:
The /the/path/to/unix/domain/socket is a constant string instead of a
variable; IMHO, it's unlikely to accidentally delete a wrong file due to
typo.

Thanks

Shuxin


On 11/30/16 6:57 AM, Maxim Dounin wrote:
> Hello!
>
> On Tue, Nov 29, 2016 at 01:30:25PM -0800, Shuxin Yang wrote:
>
>> Is there any reason not to delete UNIX domain socket before bind?
> To name a few, deleting a socket implies that:
>
> a) any file can be accidentally deleted due to a typo in the
> listen directive;
>
> b) attempts to do duplicate listen are not detected and silently
> break service, e.g., if you start duplicate instance of nginx.
>
> Instead we delete the socket after closing it.
>

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

Why not remove UNIX domain socket before bind

Shuxin Yang 722 November 29, 2016 04:32PM

Re: Why not remove UNIX domain socket before bind

Datong Sun via nginx-devel 396 November 30, 2016 02:12AM

Re: Why not remove UNIX domain socket before bind

Shuxin Yang 421 November 30, 2016 02:40AM

Re: Why not remove UNIX domain socket before bind

Maxim Dounin 312 November 30, 2016 09:58AM

Re: Why not remove UNIX domain socket before bind

Shuxin Yang 314 November 30, 2016 11:32AM

Re: Why not remove UNIX domain socket before bind

Datong Sun via nginx-devel 351 December 01, 2016 04:18AM

Re: Why not remove UNIX domain socket before bind

Alexey Ivanov 334 December 01, 2016 04:22AM

Re: Why not remove UNIX domain socket before bind

Maxim Dounin 406 December 01, 2016 08:48AM



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

Online Users

Guests: 319
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