Skip site navigation (1) Skip section navigation (2)

Re: SIGCHLD handler in Postgres C function.

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bill Studenmund <wrstuden(at)zembu(dot)com>, Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, spshealy(at)yahoo(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: SIGCHLD handler in Postgres C function.
Date: 2001-07-30 23:41:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> Bill Studenmund <wrstuden(at)zembu(dot)com> writes:
> > Looking at source on the web, I found:
> > kernel/signal.c:1042
> > * Note the silly behaviour of SIGCHLD: SIG_IGN means that the
> > * signal isn't actually ignored, but does automatic child
> > * reaping, while SIG_DFL is explicitly said by POSIX to force
> > * the signal to be ignored.
> Hmm, interesting.  If you'll recall, the start of this thread was a
> proposal to change our backends' handling of SIGCHLD from SIG_IGN to
> SIG_DFL (and get rid of explicit tests for ECHILD).  I didn't quite see
> why changing the handler should make a difference, but above we seem to
> have the smoking gun.
> Which kernel, and which version, is the above quote from?

The auto-reaping is standard SysV behavior, while BSD is really ignore. 
See the Steven's Unix Programming book for more info.

  Bruce Momjian                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2001-07-30 23:42:29
Subject: Re: OpenUnix 8 Patchj
Previous:From: Larry RosenmanDate: 2001-07-30 23:37:24
Subject: Re: Autoconf 2.50 is out (was Re: Re: OpenUnix 8 Patch)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group