From c730a5a5d937829b9c9b75286fe687feae5ef6f1 Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Thu, 24 Sep 2009 04:29:10 +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/src') diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index e87b2bd89..4d6947857 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -1300,7 +1300,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", @@ -1314,7 +1314,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