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

From: Jeremy Kerr <jk(at)ozlabs(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, Marko Kreen <markokr(at)gmail(dot)com>
Subject: Re: [RFC,PATCH] SIGPIPE masking in local socket connections
Date: 2009-06-02 14:36:06
Message-ID: 200906030036.07118.jk@ozlabs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom,

> A feature that is exercised via setsockopt is probably fairly safe,
> since you can check for failure of the setsockopt call and then do
> it the old way. MSG_NOSIGNAL is a recv() flag, no?

It's a flag to send().

> 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 :(

Cheers,

Jeremy

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-06-02 14:38:27 Re: explain analyze rows=%.0f
Previous Message Tom Lane 2009-06-02 14:29:08 Re: pg_migrator and making columns invisible