-
Notifications
You must be signed in to change notification settings - Fork 18k
net: UnixConn lacks CloseRead, CloseWrite #3345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
TCP has it, so I'm guessing it could be added to UnixConn after Go 1. http://code.google.com/p/go/source/detail?r=f68009c4a907 |
Here's an example app which behaves better if you have CloseWrite on the unix socket. I just don't understand how it's supposed to work in the case where the remote end crashes instead of shutting down cleanly. Attachments:
|
I think there is a bigger problem. Here is a better test: UnixPair sameProcClose closeWrite=false hang UnixPair sameProcClose closeWrite=true ok UnixPair childProcClose flag=panic hang UnixPair childProcClose flag=close hang UnixPair childProcClose flag=closeWrite ok UnixConnectedPair sameProcClose cw=false ok UnixConnectedPair sameProcClose cw=true ok UnixConnectedPair childProcClose panic hang UnixConnectedPair childProcClose close hang UnixConnectedPair childProcClose cw ok As I understand it, all of these should work. Attachments:
|
Fixed up my unixPair function to close the output of os.NewFile after calling net.FileConn, since it does a dup. A few more work now. Still investigating. Attachments:
|
Okay, I fixed all the tests. So closing at least works to kill the connection, if you make 100% sure you don't have extra file descriptors for it lying around in your process. Attachments:
|
This issue was closed by revision 0ce9045. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: