-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
x/sys/windows/namedpipe: new package #49650
Comments
Until the issues regarding x/sys/windows have been discussed and concluded, I have no plans to maintain this code and therefore I can't support this proposal. |
@zx2c4 Is there a place where those issues are being discussed? Thanks. |
Russ' comments on https://go-review.googlesource.com/c/sys/+/299009 |
I'm sorry, I wrote a reply on that CL yesterday but forget to hit send. |
Why both The fact that the |
For concreteness, here is the API from the external package:
Initial feedback:
|
We can ditch the DialTimeout one if you like, and just do DialContext and then,
and then do that. Does it then make sense to add Context as an optional member of DialConfig, and have the nil value default to a context.Background() with a two second timeout? Or would this be very non-standard and weird, and the whole idiom is to pass around contexts as arguments from one function to another? I suspect the latter, but in case the former actually would be nice, thought I should at least throw it out there.
Will do.
I guess that'd be technically possible. The idea being - what if you want to just listen for 2 seconds and then have the listener automatically close? Sounds like a somewhat plausible use case. Do other listeners take a context?
Will clarify.
Because they're passed to NtCreateNamedPipeFile, which takes a uint32. So actually they should be uint32s. I'll fix that. |
In getting rid of DialTimeout and going Context-only, one thing I'm noticing is having to change a lot of checks for |
The CL has been updated now with the above changes. Running
|
Change https://golang.org/cl/299009 mentions this issue: |
I think I recall that this is not accurate--I believe npfs uses this as a quota for the maximum number of bytes that can be queued. Writes by the client will be pended in the kernel until there is sufficient quota or a matching reader is present who can consume the data directly. (Same for OutputBufferSize, of course.) |
Thanks. Will update. |
Thanks for working on this API. |
This proposal has been added to the active column of the proposals project |
Based on the discussion above, this proposal seems like a likely accept. |
No change in consensus, so accepted. 🎉 |
Bringing the Gerrit discussion over here because it's easier to discuss here. @ianlancetaylor @bufflig @jstarks The code in CL 299009 is partially © Microsoft. Based on the earlier discussion, it seems like we can do one of: a) Submit it now, and hope at some point we get the go-ahead from Microsoft to remove their copyright header in a future CL. I'd like to actually use this code from x/sys, so I'm leaning in favor of (a) or (b), but maybe there are opinions to the contrary. How shall we proceed? |
I would hope to hear from @jstarks or somebody else at Microsoft. Given the holidays maybe if we haven't heard by early January we can consider option (a). |
@ianlancetaylor It's January and no word from @jstarks, so can we go with option (a) now please? |
Let's give it another week. Thanks. |
No update yet. |
Things are looking good; give me a few days to work out the details. |
9 days later, so option (a), and then we'll hear back from @jstarks sometime later and change things then? |
I know you want to get this done but is there a special rush here? Since it seems like we are making progress I'd rather take the time to get it right. Thanks. |
Over a month has passed. Not wanting this to crust over, can we finally merge it? Microsoft's legal stuff will move at the pace that it does and we can change things up at that later date. |
@ianlancetaylor Paging again after another month has passed. Can we merge this please? |
@jstarks Any update? @zx2c4 I understand the frustration, I do. But speaking purely personally I would vote against submitting code that is copyright Microsoft into the main Go repos. That will cause undesirable long-term pain. So I don't want to follow a process of "check it in and then maybe change it later if we can." I'm sorry that this is so frustrating. I've personally spent multiple years waiting for copyright issues to clear in other cases, so I know what it's like. |
It sounds like your opinion in #49650 (comment) has changed then, when you said we could maybe do option (a) in January? To be clear, it's fine if your opinion has changed, but it'd be useful to me to make that clear so I can manage my expectations. |
Yes, I suppose my opinion has changed. Sorry about that. |
I'll ping @jstarks internally, he probably doesn't review GitHub notifications frequently. |
7 months later, can we merge this finally? |
@ianlancetaylor ping? |
Little progress here. I've started a new thread with legal to internally revamp this. Can't commit to a deadline because I'm not in the sign off chain, just trying to make things happen. |
Update, Dec 8 2021: Proposed API is in #49650 (comment) -rsc
https://go-review.googlesource.com/c/sys/+/299009 is a CL to add a new "namedpipe" package to x/sys/windows/namedpipe.
This is an accompanying proposal for its API addition.
From that CL's commit message:
The proposed API can more be seen here, which already exists outside of x/:
https://pkg.go.dev/golang.zx2c4.com/wireguard/ipc/namedpipe
It's basically a Unix socket dia/listen API but over Windows named pipes.
/cc @zx2c4 @jstarks
The text was updated successfully, but these errors were encountered: