Why not remove UNIX domain socket before bind
savetherbtz at gmail.com
Thu Dec 1 09:20:43 UTC 2016
Why not just use `flock(2)` there?
> On Nov 30, 2016, at 6:57 AM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> 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.
> Maxim Dounin
> nginx-devel mailing list
> nginx-devel at nginx.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the nginx-devel