summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2010-05-28 06:05:48 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-05-31 05:39:17 -0700
commita841aba0844e69e3a11205f4f0b5176bcc0cb362 (patch)
tree7b02b67753adc1c5bf130069fc3002763ccc6dfe
parent065ac01684dabd4cca4bde3048ef2f13cc2357cb (diff)
OS X: salvage signal handling from mount routine
Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 361 (GlusterFS 3.0 should work on Mac OS/X) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=361
-rw-r--r--contrib/macfuse/mount_darwin.c5
1 files 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();