aboutsummaryrefslogtreecommitdiffstats
path: root/pseudo_wrappers.c
diff options
context:
space:
mode:
authorPeter Seebach <seebs@eee12.(none)>2010-04-20 19:54:42 -0500
committerPeter Seebach <peter.seebach@windriver.com>2010-04-26 17:13:45 -0700
commit69de8f0dfdd47fb70487f0d8213e5659e9b7e2c6 (patch)
treedd2fd882927355fa9640adb6d32ff85520720b99 /pseudo_wrappers.c
parentaceacb055724aae4c4e8822db19a8faf1943d9ef (diff)
downloadpseudo-69de8f0dfdd47fb70487f0d8213e5659e9b7e2c6.tar.gz
pseudo-69de8f0dfdd47fb70487f0d8213e5659e9b7e2c6.tar.bz2
pseudo-69de8f0dfdd47fb70487f0d8213e5659e9b7e2c6.zip
Avoid signalling during mutex operations.
remake(1) can try to close a file from a signal handler. Since any entrance to a pseudo-emulated function requires the mutex, this can result in a deadlock. Solution: Suspend SIGCHLD (and a couple of other signals likely to result in filesystem operations) for the duration of the lock.
Diffstat (limited to 'pseudo_wrappers.c')
-rw-r--r--pseudo_wrappers.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pseudo_wrappers.c b/pseudo_wrappers.c
index fd864f1..2ea4a04 100644
--- a/pseudo_wrappers.c
+++ b/pseudo_wrappers.c
@@ -8,6 +8,7 @@
#include <string.h>
#include <errno.h>
#include <pthread.h>
+#include <signal.h>
#include <sys/types.h>
#include <unistd.h>