From: | Scott Lamb <slamb(at)slamb(dot)org> |
---|---|
To: | Steve Atkins <steve(at)blighty(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Mixing threaded and non-threaded |
Date: | 2004-01-27 20:27:53 |
Message-ID: | 48B27D84-5107-11D8-8133-000A95891440@slamb.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Jan 27, 2004, at 1:16 PM, Steve Atkins wrote:
> A hint, though, might be that it's a multiprocess application with a
> single master process that controls dozens of child processes. When the
> master shuts down it asks all the children to shut down, and then it
> deadlocks in the SIGCHILD handler.
It's not safe to do anything interesting in a SIGCHLD handler, unless
you have pretty severe restrictions on when the signal can arrive. Take
a look at
<http://www.opengroup.org/onlinepubs/007904975/functions/
xsh_chap02_04.html>. It contains a list of all the async signal-safe
functions in SUSv3. It's a pretty short list. Notably absent are
pthread_mutex_*() and malloc() (and anything that uses them).
Scott Lamb
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2004-01-27 20:36:20 | Question about indexes |
Previous Message | Dennis Bjorklund | 2004-01-27 20:24:53 | Re: Function call |