bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH replace vfork with fork] remove deprecated vfork


From: Paul Eggert
Subject: Re: [PATCH replace vfork with fork] remove deprecated vfork
Date: Sat, 19 Nov 2022 19:56:45 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 2022-11-19 17:01, Minsoo Choo wrote:

vfork(2) is removed on Single Unix Specifiction Issue 7, 2018 Edition.

That's OK. Gnulib uses lots of features that are not specified by POSIX. It does so by probing the system to see whether the feature is available as an extension to POSIX, which vfork often is. If future operating systems remove vfork, the code will continue to work because HAVE_VFORK won't be defined.
However, if we really need to use vfork, we can apply

# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
...
# pragma GCC diagnostic pop

to ensure to the users that our vfork is safe.

We've run into another problem like this on macOS, where it incorrectly complains about uses of sprintf. Perhaps Gnulib should simply use -Wno-deprecated-declarations on macOS?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]