-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Set closed global file descriptors to -1 #2000
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
base: master
Are you sure you want to change the base?
Set closed global file descriptors to -1 #2000
Conversation
|
My test seems to be OK... ./src/iperf3 -c localhost -V -t 5 -T test1 |
|
Hi. Does your install include sudo ldconfig after sudo make install?. Thanks! |
|
Further testing shows that... ./test_commands.sh localhost works on a Raspberry Pi but not on Ubuntu as per your tests. |
|
Note also that even in the successful tests, the Socket ID in the last lines of the statistics reports is "-1". E.g. from the build-test-macos-ish: |
Good spot! I'm working on a fix. The management of test->ctrl_sck isn't quite right. It appears to be closing too early and setting it to -1 has exposed it. |
PLEASE NOTE the following text from the iperf3 license. Submitting a
pull request to the iperf3 repository constitutes "[making]
Enhancements available...publicly":
The complete iperf3 license is available in the
LICENSEfile in thetop directory of the iperf3 source tree.
Version of iperf3 (or development branch, such as
masteror3.1-STABLE) to which this pull request applies:master
Issues fixed (if any):
It's just good management to set a file descriptor to -1 when it's been closed.
Brief description of code changes (suitable for use as a commit message):
All the FDs which are global have been set to -1 after closing.