From 2317913ae5556fe402828d97f7da761124c15ba2 Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Thu, 24 Sep 2009 04:30:06 +0000 Subject: glusterfsd/main: Do a sem_post only if running in daemon mode. Signed-off-by: Anand V. Avati BUG: 4 (mount --bind fails if run immediately after mounting GlusterFS) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=4 --- glusterfsd/src/glusterfsd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'glusterfsd') diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index fc837a4ce68..19bb787abd4 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -1358,7 +1358,7 @@ main (int argc, char *argv[]) if (glusterfs_graph_init (graph, fuse_volume_found) != 0) { gf_log ("glusterfs", GF_LOG_ERROR, "translator initialization failed. exiting"); - if (sem_post (semid) < 0) { + if (!cmd_args->no_daemon_mode && (sem_post (semid) < 0)) { gf_log ("glusterfs", GF_LOG_ERROR, "semaphore synchronization failed," " daemonize problem.exiting: %s", @@ -1372,7 +1372,7 @@ main (int argc, char *argv[]) gf_log ("glusterfs", GF_LOG_NORMAL, "Successfully started"); - if (sem_post (semid) < 0) { + if (!cmd_args->no_daemon_mode && (sem_post (semid) < 0)) { gf_log ("glusterfs", GF_LOG_ERROR, "semaphore synchronization failed," " daemonize problem. exiting: %s", -- cgit