Set closed global file descriptors to -1#2000
Set closed global file descriptors to -1#2000WatcherOfTheSkies wants to merge 6 commits intoesnet:masterfrom
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.