Re: why not remove AF_LOCAL sockets on last close?

2010-06-26 Thread der Mouse
Can anyone tell me why, exactly, we shouldn't remove bound AF_LOCAL sockets from the filesystem on last close? Well, I wouldn't expect it to be easy; it means that every AF_LOCAL socket needs to keep track of its directory,name pair. This leaves open the question of what to do if it has

Re: why not remove AF_LOCAL sockets on last close?

2010-06-26 Thread der Mouse
But I agree that if leaving the sockets around permits no interesting feature whatsoever (i.e. it doesn't even serve for SO_REUSEADDR), I've been trying to think of any such feature since this discussion started. So far i've failed. it very well could be a design or implementation bug, I

Re: why not remove AF_LOCAL sockets on last close?

2010-06-26 Thread der Mouse
A reason might be that every other system behaves the same way and being different will just lead to non-portable code. Non-portable *how*? What exactly would happen? I don't know, and if you've got an argument that code written for either behavior will be ok both places I don't have a

Re: why not remove AF_LOCAL sockets on last close?

2010-06-25 Thread Matthias Scheler
On Thu, Jun 24, 2010 at 10:55:51PM -0400, Thor Simon wrote: Can anyone tell me why, exactly, we shouldn't remove bound AF_LOCAL sockets from the filesystem on last close? I think of a reason for that as they are completely useless with a process attached to them anyway. Kind regards

Re: why not remove AF_LOCAL sockets on last close?

2010-06-25 Thread Robert Elz
Date:Thu, 24 Jun 2010 22:55:51 -0400 From:Thor Simon t...@coyotepoint.com Message-ID: 20100625025551.ga6...@coyotepoint.com | Can anyone tell me why, exactly, we shouldn't remove bound AF_LOCAL | sockets from the filesystem on last close? I suspect the original

Re: why not remove AF_LOCAL sockets on last close?

2010-06-25 Thread Greg Troxel
Can anyone tell me why, exactly, we shouldn't remove bound AF_LOCAL sockets from the filesystem on last close? The following test program produces second socket bind failed on every system I've tested it on, and seems to cover the only possible use case for this feature... Have you

Re: why not remove AF_LOCAL sockets on last close?

2010-06-25 Thread Matthew Mondor
On Thu, 24 Jun 2010 22:55:51 -0400 Thor Simon t...@coyotepoint.com wrote: Can anyone tell me why, exactly, we shouldn't remove bound AF_LOCAL sockets from the filesystem on last close? The following test program produces second socket bind failed on every system I've tested it on, and seems

Re: why not remove AF_LOCAL sockets on last close?

2010-06-25 Thread Matthew Mondor
On Fri, 25 Jun 2010 14:51:45 +0200 Joerg Sonnenberger jo...@britannica.bec.de wrote: On Thu, Jun 24, 2010 at 10:55:51PM -0400, Thor Simon wrote: Can anyone tell me why, exactly, we shouldn't remove bound AF_LOCAL sockets from the filesystem on last close? If you want to do that, wouldn't

Re: why not remove AF_LOCAL sockets on last close?

2010-06-25 Thread Thor Simon
On Fri, Jun 25, 2010 at 08:47:49AM -0400, Greg Troxel wrote: Can anyone tell me why, exactly, we shouldn't remove bound AF_LOCAL sockets from the filesystem on last close? The following test program produces second socket bind failed on every system I've tested it on, and seems to

Re: why not remove AF_LOCAL sockets on last close?

2010-06-25 Thread Thor Lancelot Simon
On Fri, Jun 25, 2010 at 08:59:18AM -0400, Matthew Mondor wrote: On Thu, 24 Jun 2010 22:55:51 -0400 Thor Simon t...@coyotepoint.com wrote: Can anyone tell me why, exactly, we shouldn't remove bound AF_LOCAL sockets from the filesystem on last close? The following test program produces

Re: why not remove AF_LOCAL sockets on last close?

2010-06-25 Thread Thor Lancelot Simon
On Fri, Jun 25, 2010 at 02:51:45PM +0200, Joerg Sonnenberger wrote: On Thu, Jun 24, 2010 at 10:55:51PM -0400, Thor Simon wrote: Can anyone tell me why, exactly, we shouldn't remove bound AF_LOCAL sockets from the filesystem on last close? If you want to do that, wouldn't it be easier to

Re: why not remove AF_LOCAL sockets on last close?

2010-06-25 Thread Matthew Mondor
On Fri, 25 Jun 2010 09:19:03 -0400 Thor Simon t...@coyotepoint.com wrote: I think this is (always has been) a considerable blind spot on the part of BSD partisans. Sure, we're happy to gripe about persistent SysV IPC objects every time we have to remember how to use ipcrm, but bound AF_UNIX

Re: why not remove AF_LOCAL sockets on last close?

2010-06-25 Thread Matthew Mondor
On Fri, 25 Jun 2010 08:59:18 -0400 Matthew Mondor mm_li...@pulsar-zone.net wrote: However, I wrote a small test program and realized that despite SO_REUSEADDR this doesn't work, and indeed after checking the kernel code SO_REUSEADDR is ignored in the AF_LOCAL unp_bind() code. Out of

Re: why not remove AF_LOCAL sockets on last close?

2010-06-25 Thread Greg Troxel
Thor Simon t...@coyotepoint.com writes: On Fri, Jun 25, 2010 at 08:47:49AM -0400, Greg Troxel wrote: Can anyone tell me why, exactly, we shouldn't remove bound AF_LOCAL sockets from the filesystem on last close? The following test program produces second socket bind failed on every

Re: why not remove AF_LOCAL sockets on last close?

2010-06-25 Thread Joerg Sonnenberger
On Fri, Jun 25, 2010 at 09:32:40AM -0400, Thor Lancelot Simon wrote: On Fri, Jun 25, 2010 at 02:51:45PM +0200, Joerg Sonnenberger wrote: On Thu, Jun 24, 2010 at 10:55:51PM -0400, Thor Simon wrote: Can anyone tell me why, exactly, we shouldn't remove bound AF_LOCAL sockets from the

Re: why not remove AF_LOCAL sockets on last close?

2010-06-25 Thread Joerg Sonnenberger
On Fri, Jun 25, 2010 at 09:02:34AM -0400, Matthew Mondor wrote: On Fri, 25 Jun 2010 14:51:45 +0200 Joerg Sonnenberger jo...@britannica.bec.de wrote: On Thu, Jun 24, 2010 at 10:55:51PM -0400, Thor Simon wrote: Can anyone tell me why, exactly, we shouldn't remove bound AF_LOCAL sockets

Re: why not remove AF_LOCAL sockets on last close?

2010-06-25 Thread Thor Simon
On Fri, Jun 25, 2010 at 10:06:41AM -0400, Greg Troxel wrote: Have you looked at posix to see if it speaks to this? I don't think it gets specific enough to say. I can't actually find any discussion of this (dumb) behavior anywhere but in the bind(2) manual page. However, it looks like

why not remove AF_LOCAL sockets on last close?

2010-06-24 Thread Thor Simon
Can anyone tell me why, exactly, we shouldn't remove bound AF_LOCAL sockets from the filesystem on last close? The following test program produces second socket bind failed on every system I've tested it on, and seems to cover the only possible use case for this feature... #include sys/types.h