python / asyncio

asyncio historical repository
https://docs.python.org/3/library/asyncio.html
1.04k stars 177 forks source link

#425 Remove UNIX socket from FS before binding. #441

Closed socketpair closed 7 years ago

1st1 commented 7 years ago

I think we should also remove the socket after the server is closed.

1st1 commented 7 years ago

@socketpair FWIW we're just a couple days from a complete feature freeze of asyncio. Will you have time to finish this, or should I submit a new PR?

socketpair commented 7 years ago

I think we should also remove the socket after the server is closed. @1st1 It is not so easy, to do that, I have to intorduce something new in base_events.Server

Actually (as I think), removing before binding and removing after closing should be done at Python's socket level, not at asyncio level. But this is another sad story.

1st1 commented 7 years ago

I think we should also remove the socket after the server is closed. @1st1 It is not so easy, to do that, I have to intorduce something new in base_events.Server

Actually (as I think), removing before binding and removing after closing should be done at Python's socket level, not at asyncio level. But this is another sad story.

Maybe. But let's fix this in asyncio first.

socketpair commented 7 years ago

Maybe. But let's fix this in asyncio first.

@1st1 Can you advice best way to add unlink() after closing ?

1st1 commented 7 years ago

@1st1 Can you advice best way to add removing after closing ?

After giving this some thought - let's not add this. I now remember an issue with uvloop: originally I was removing the path, but then someone's program broke because it was cleaning up the path manually and assumed it's always there.

Trying to remove the path before connecting to it makes total sense, removing it after is nice, but not strictly necessary.

1st1 commented 7 years ago

Thank you, Mark!