summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-09-24 04:29:10 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-09-24 05:19:34 -0700
commitc730a5a5d937829b9c9b75286fe687feae5ef6f1 (patch)
tree446750905e95906f7b19908c02120f5ac6db5bc7
parent4ab8f717e23dda136f35c30ab103762afef6ff7a (diff)
glusterfsd/main: Do a sem_post only if running in daemon mode.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 4 (mount --bind fails if run immediately after mounting GlusterFS) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=4
-rw-r--r--glusterfsd/src/glusterfsd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index e87b2bd894d..4d6947857ca 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",