esnet / esnet/iperf

iperf3 v3.9 on macOS using deprecated 'daemon'; recommended to use posix_spawn APIs instead

Open
#1,048 1 comment 0 reactions 0 assignees View on GitHub
Help Wanted portability
Dominant language
C
Stars
8.8k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

_NOTE: The iperf3 issue tracker is for registering bugs, enhancement
requests, or submissions of code. It is not a means for asking
questions about building or using iperf3. Those are best directed
towards the iperf3 mailing list at iperf-dev@googlegroups.com or
question sites such as Stack Overflow
(http://www.stackoverflow.com/). A list of frequently-asked questions
regarding iperf3 can be found at http://software.es.net/iperf/faq.html._

# Context

* Version of iperf3: 3.9

* Hardware: Apple MacBook Pro (Retina, 15-inch, Mid 2014), 2.8 GHz Quad-Core Intel Core i7, 16GB RAM

* Operating system (and distribution, if any): macOS 10.15.6 "Catalina" with all updates

_Please note: iperf3 is supported on Linux, FreeBSD, and macOS.
Support may be provided on a best-effort basis to other UNIX-like
platforms. We cannot provide support for building and/or running
iperf3 on Windows, iOS, or Android._

* Other relevant information (for example, non-default compilers,
libraries, cross-compiling, etc.):

_Please fill out one of the "Bug Report" or "Enhancement Request"
sections, as appropriate._

# Bug Report

* Expected Behavior

Clean compile. Have XCode 11.7 installed and using CLI tools to do build as usual.

This is more of an FYI but thought, considering the warning message and that 'daemon' was apparently first deprecated in macOS 10.5 (meaning nearly 13 years ago), you might like to know and possibly make some adjustments.

* Actual Behavior

During the `make` step a warning is thrown up explaining this.

Mind you, the code compiles and still runs. But using deprecated features is always suboptimal and at risk of breaking the compile once those features are removed.

```
% make
Making all in src
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
CC iperf3-main.o
main.c:141:8: warning: 'daemon' is deprecated: first deprecated in macOS 10.5 -
Use posix_spawn APIs instead. [-Wdeprecated-declarations]
rc = daemon(0, 0);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdlib.h:292:6: note:
'daemon' has been explicitly marked deprecated here
int daemon(int, int) __DARWIN_1050(daemon) __OSX_AVAILABLE_BUT_DEPR...
^
1 warning generated.
...
```

* Steps to Reproduce

1. Download iperf3 source (iperf-3.9.tar.gz)
2. Decompress (e.g., `tar zxvf iperf-3.9.tar.gz`)
3. `cd iperf-3.9`
4. `configure`
5. `make`

* Possible Solution

Replace the use of "daemon" with posix_spawn APIs instead as the warning states.

_Please submit patches or code changes as a pull request._

# Enhancement Request

* Current behavior

* Desired behavior

* Implementation notes

_If submitting a proposed implementation of an enhancement request,
please use the pull request mechanism._

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.