0.8.35 compile error

Igor Sysoev igor at sysoev.ru
Tue Apr 6 16:44:08 MSD 2010

On Tue, Apr 06, 2010 at 04:38:09PM +0400, Boris Dolgov wrote:

> 2010/4/6 Igor Sysoev <igor at sysoev.ru>:
> > On Tue, Apr 06, 2010 at 03:56:33PM +0400, Борис Долгов wrote:
> >> 2010/4/6 Igor Sysoev <igor at sysoev.ru>:
> >> > Now this warning will always be issued on Linux: nginx has to use
> >> > sys_errlist[]/sys_nerr because both strerror() and strerror_r() are not
> >> > signal safe.
> >> Do you think if it is a good idea to use deprecated elements in nginx?
> >> Maybe, it is better to generate ngx_sys_errlist on start/compilation and use it?
> >
> > I think it's a good idea to fix strerror_r() in glibc before to deprecate
> > sys_errlist[]/sys_nerr, because strerror_r() is not 100% replacement of
> > sys_errlist[]. Or not to show text error messages in signal handlers
> > at all as nginx does on Solaris, since Solaris has no sys_errlist[].
> > BTW, FreeBSD does not the warning.
> FreeBSD man says, that sys_errlist is deprecated.
> Linux man says, that new errnos may not have been added to sys_errlist.

FreeBSD deprecates it, but does not show the silly and useless warning.
It is deprecated because it does not support a locale, and exactly the locale
support makes strerror_r() non signal safe. Actually FreeBSD's strerror()
uses sys_errlist[]. As to Linux, currently sys_errlist[] contains all errors.

Igor Sysoev

More information about the nginx mailing list