-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add SSHMaster::Connection::trySetBufferSize
#10765
base: master
Are you sure you want to change the base?
Conversation
Oh wat, segfault in CI in ambient Nix (i.e. nothing to do with this PR)
|
Is that on Darwin? Can you get a stack trace for it? |
We didn't post here, but the fcntl calls are wrong. Setter takes an |
It is unused in Nix currently, but will be used in Hydra. This reflects what Hydra does in NixOS/hydra#1387. We may probalby to use it more widely for better SSH store performance, but this needs to be subject to more testing before we do that.
bbeb2fc
to
05be135
Compare
Nit: why design the interface with EDIT: especially note that the (current) implementation silently overflows to non-sensical values. |
@vcunat ah I could assert, or that + change type to |
Could you add a test? We can't just rely on types here, unfortunately. |
Accepting negative numbers? Well, if you do an But perhaps more generally: the function returns the resulting buffer size (or negative error code), so perhaps it would make sense to check the return value? Overriding buffer size surely won't be a very important error, but perhaps some debug-level logs in case the value differs from what was passed as desired size? (that could even cover these negative cases by itself) EDIT: I don't know the customs of Nix codebase, and I only really use pure C, so... take my comments with a grain of salt. |
Motivation
It is unused in Nix currently, but will be used in Hydra. This reflects what Hydra does in NixOS/hydra#1387.
Context
We may probably to use it more widely for better SSH store performance, but this needs to be subject to more testing before we do that.
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.