aio/unix: Use signal.sival which is standard
Maxim Dounin
mdounin at mdounin.ru
Thu Jan 24 14:59:14 UTC 2019
Hello!
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[1]. Standard-complaint name was restored in 2005 (first
released in FreeBSD 7.0 in 2008), retaining compatibility with
previous versions[2][3]. Similar changes were committed in
DragonFly in 2009[4].
Since initial AIO support in nginx was introduced in 2003[5], 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.
[1] https://github.com/freebsd/freebsd/commit/53573bf465904188986e8c982e8019835628d6b2
[2] https://github.com/freebsd/freebsd/commit/ae161ac2394e00bb3afca0667a13243d7963dfe2
[3] https://github.com/freebsd/freebsd/commit/54f35995c2ce65f23beb667de4ccf3d68139a81a
[4] https://gitweb.dragonflybsd.org/dragonfly.git/commit/36934016eeaca3abd418acb1c68bd391d3b54aa7
[5] http://hg.nginx.org/nginx/rev/738fe44c70d5
--
Maxim Dounin
http://mdounin.ru/
More information about the nginx-devel
mailing list