unlink file
benaryorg opened this issue · 2 comments
I just noticed that the file-socket is not unlinked (deleted) upon dropping the listener.
Is there a reason for that or can I just send a PR in which the listener implements Drop
and unlinks the file?
The reason is that the underlying system calls don't unlink the file. This library is designed to fairly directly expose the underlying system calls with minimal extra "stuff" on top, so I'm not sure I'd be on board with a change to the destructor that deletes the socket file, personally. I believe the behavior may also differ based on the operating system.
Okay, if there's a reason for it, I'll close this.
Thanks for the information.
Although, it would be nice to have this somewhere in the docs (preferably in the example).
It's just this line:
std::fs::remove_file(file).unwrap();