aio/unix: Use signal.sival which is standard
mdounin at mdounin.ru
Thu Jan 24 14:59:14 UTC 2019
On Thu, Jan 24, 2019 at 10:07:57AM +0800, Sepherosa Ziehau wrote:
> On Tue, Jan 22, 2019 at 10:54 PM Maxim Dounin <mdounin at mdounin.ru> wrote:
> > This needs to be extended with some background information -
> > notably why it used to be sigval_ptr, and why to switch to
> > sival_ptr.
> I am not sure why it used to be sigval_ptr; seems to be a miss name in
> FreeBSD. And the code seems to assume having KQUEUE == having sigval_ptr.
> As about why the switching:
> - It's POSIX standard.
> - It was noticed recently in DragonFly, since we removed this compat
> field (sigval_ptr), since after scanning the source code in ports
> system, nginx seems to be the only one using sigval_ptr.
Yes, Sergey have details on hand. It was renamed (likely by
accident) in 1999 (FreeBSD 4.0) when introducing SA_SIGINFO
support. Standard-complaint name was restored in 2005 (first
released in FreeBSD 7.0 in 2008), retaining compatibility with
previous versions. Similar changes were committed in
DragonFly in 2009.
Since initial AIO support in nginx was introduced in 2003, it
used the only name available at the moment.
Switching to a standard name now is fine, especially giving that
we can easily retain compatibility with previous versions.
But at least some of these details need to be preserved in the
commit log, and that's what I was asking Sergey about.
More information about the nginx-devel