Re: SIGPIPE handling

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: SIGPIPE handling
Дата
Msg-id 200401081604.i08G4jh15121@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: SIGPIPE handling  (Manfred Spraul <manfred@colorfullife.com>)
Список pgsql-patches
Manfred Spraul wrote:
> Bruce Momjian wrote:
>
> >>
> >>+     /*
> >>+      *    We could lose a signal during this test.
> >>+      *    In a multi-threaded application, this might
> >>+      *    be a problem.  Do any non-threaded platforms
> >>
> Threaded or non-threaded?

OK, yea, I will use threaded.

> >>+      *    lack sigaction()?
> >>+      */
> >>
> Additionally, the problem is not restricted to multithreaded apps:
> signal(,SIG_IGN) clears all pending signals.

Oh, yuck.  Would SIG_DFL be better here?  I am thinking of adding
sigblock into that code on the assumption that if they have signal(),
they have sigblock().  Should we disable threaded builds unless they
have sigaction()?

I suppose the sigblock() would take care of the pending signal problem
too.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

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

Предыдущее
От: Claudio Natoli
Дата:
Сообщение: fork/exec patch: CreateProcess calls for Win32
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: SIGPIPE handling