From a841aba0844e69e3a11205f4f0b5176bcc0cb362 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Fri, 28 May 2010 06:05:48 +0000 Subject: OS X: salvage signal handling from mount routine Signed-off-by: Csaba Henk Signed-off-by: Anand V. Avati BUG: 361 (GlusterFS 3.0 should work on Mac OS/X) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=361 --- contrib/macfuse/mount_darwin.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/macfuse/mount_darwin.c b/contrib/macfuse/mount_darwin.c index f7fcc2a70ed..9d87fca3596 100644 --- a/contrib/macfuse/mount_darwin.c +++ b/contrib/macfuse/mount_darwin.c @@ -139,6 +139,7 @@ gf_fuse_mount (const char *mountpoint, char *fsname, char *mnt_param) int result; char *fdnam, *dev; const char *mountprog = MACFUSE_MOUNT_PROG; + sig_t chldf; /* mount_fusefs should not try to spawn the daemon */ setenv("MOUNT_FUSEFS_SAFE", "1", 1); @@ -156,7 +157,7 @@ gf_fuse_mount (const char *mountpoint, char *fsname, char *mnt_param) return -1; } - signal(SIGCHLD, SIG_DFL); /* So that we can wait4() below. */ + chldf = signal(SIGCHLD, SIG_DFL); /* So that we can wait4() below. */ result = loadkmod(); if (result == EINVAL) @@ -246,7 +247,7 @@ mount: if (getenv("FUSE_NO_MOUNT") || ! mountpoint) goto out; - signal(SIGCHLD, SIG_IGN); + signal(SIGCHLD, chldf); pid = fork(); -- cgit