Welcome! Log In Create A New Profile

Advanced

Re: 0.9.1 compilation failure on Nexenta 3.0.1

Maxim Dounin
December 06, 2010 11:38AM
Hello!

On Mon, Dec 06, 2010 at 06:30:08PM +0300, Igor Sysoev wrote:

> On Mon, Dec 06, 2010 at 06:00:57PM +0300, Maxim Dounin wrote:
>
> > On Mon, Dec 06, 2010 at 05:36:13PM +0300, Igor Sysoev wrote:
> > > Yes, I've just checked OpenSolaris, it has no sys_nerr.
> > > I will detect maximum errno using EINVAL error from strerror().
> >
> > What about just not using strerror() while in signal handler (and
> > using normal one in other cases)? I believe we've already seen
> > too many problems while trying to build async-signal-safe version
> > of strerror().
> >
> > Maxim Dounin
> >
> > p.s. If for some reason you'll still prefer to continue attempts
> > to build async-signal-safe strerror() - please note that POSIX
> > doesn't require strerror() to return EINVAL for invalid codes, it
> > only says "may".
>
> I believe it will be the last iteration.

I wish it will... Unfortunately, I'm almost sure it won't. POSIX
doesn't specify anything about error codes, and it's not really
safe to assume they are somehow ordered.

> Actually the current ngx_strerror_r() in 0.8.x is a set of hacks
> and workarounds, collected during nginx development.
> For example, Linux GNU strerror_r() is very different than POSIX one.

Yes, I understand. My general idea is to use POSIX interface if
available, and use hacks/workarounds only if they are known to be
needed. This way it will be as portable as possible.

The only real problem with POSIX strerror_r() is that it isn't
async-signal-safe. And I think it's fair enough to don't print
error message if an error happens in a signal handler.

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

0.9.1 compilation failure on Nexenta 3.0.1

edogawaconan December 05, 2010 04:50AM

Re: 0.9.1 compilation failure on Nexenta 3.0.1

Piotr Sikora December 05, 2010 08:04AM

Re: 0.9.1 compilation failure on Nexenta 3.0.1

edogawaconan December 05, 2010 09:46AM

Re: 0.9.1 compilation failure on Nexenta 3.0.1

Igor Sysoev December 06, 2010 08:26AM

Re: 0.9.1 compilation failure on Nexenta 3.0.1

edogawaconan December 06, 2010 09:14AM

Re: 0.9.1 compilation failure on Nexenta 3.0.1

Igor Sysoev December 06, 2010 09:18AM

Re: 0.9.1 compilation failure on Nexenta 3.0.1

edogawaconan December 06, 2010 09:36AM

Re: 0.9.1 compilation failure on Nexenta 3.0.1

Igor Sysoev December 06, 2010 09:40AM

Re: 0.9.1 compilation failure on Nexenta 3.0.1

Maxim Dounin December 06, 2010 10:06AM

Re: 0.9.1 compilation failure on Nexenta 3.0.1

Igor Sysoev December 06, 2010 10:36AM

Re: 0.9.1 compilation failure on Nexenta 3.0.1

Maxim Dounin December 06, 2010 11:38AM

Re: 0.9.1 compilation failure on Nexenta 3.0.1

Igor Sysoev December 06, 2010 10:36AM

Re: 0.9.1 compilation failure on Nexenta 3.0.1

WilliamOMS December 06, 2010 12:19PM

Re: 0.9.1 compilation failure on Nexenta 3.0.1

edogawaconan December 06, 2010 12:20PM

Re: 0.9.1 compilation failure on Nexenta 3.0.1

Igor Sysoev December 06, 2010 12:26PM

Re: 0.9.1 compilation failure on Nexenta 3.0.1

edogawaconan December 06, 2010 01:00PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 161
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready