Обсуждение: Re: SIGCHLD handler in Postgres C function.

Поиск
Список
Период
Сортировка

Re: SIGCHLD handler in Postgres C function.

От
Tom Lane
Дата:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> The auto-reaping is standard SysV behavior, while BSD is really ignore. 

You'll recall the ECHILD exception was installed by Tatsuo after seeing
problems on Solaris.  Evidently Solaris uses the auto-reap behavior too.

I'm somewhat surprised that HPUX does not --- it tends to follow its
SysV heritage when there's a conflict between that and BSD practice.
Guess they went BSD on this one.
        regards, tom lane


Re: SIGCHLD handler in Postgres C function.

От
Giles Lean
Дата:
> You'll recall the ECHILD exception was installed by Tatsuo after seeing
> problems on Solaris.  Evidently Solaris uses the auto-reap behavior too.
> 
> I'm somewhat surprised that HPUX does not --- it tends to follow its
> SysV heritage when there's a conflict between that and BSD practice.
> Guess they went BSD on this one.

If the SysV behaviour of automatically reaping child processes is
required on HP-UX the handler for SIGCHLD can be set to SIG_IGN.
When the handler is SIG_DFL the signal will be ignored but child
processes won't be reaped automatically.  This is the same behaviour
that Stevens describes for SysVr4.  ("Advanced Programming in the Unix
Environment", section 10.7.)

What different implementations of system(3) with different settings of
SIGCHLD is another can of worms, and one I've not investigated. :-)

Regards,

Giles