Re: [RFC,PATCH] SIGPIPE masking in local socket connections

Поиск
Список
Период
Сортировка
Jeremy Kerr <jk@ozlabs.org> writes:
>> MSG_NOSIGNAL is a recv() flag, no?

> It's a flag to send().

Doh, need more caffeine.

>> The question is whether you could expect that the recv() would fail if
>> it had any unrecognized flags.  Not sure if I trust that. SO_NOSIGPIPE
>> seems safer.

> Yep, a once-off test would be better. However, I don't seem to have a 
> NOSIGPIPE sockopt here :(

On OS X I see SO_NOSIGPIPE but not MSG_NOSIGNAL.  Seems like we might
have to support both if we want this to work as widely as possible.

The SUS man page for send() does explicitly specify an error code for
unrecognized flags bits, so maybe it's safe to assume that we'll get
an error if we set MSG_NOSIGNAL but the kernel doesn't recognize it.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Marko Kreen
Дата:
Сообщение: Re: [RFC,PATCH] SIGPIPE masking in local socket connections
Следующее
От: Aidan Van Dyk
Дата:
Сообщение: Re: PostgreSQL Developer meeting minutes up