diff options
Diffstat (limited to 'libglusterfs/src/common-utils.c')
-rw-r--r-- | libglusterfs/src/common-utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index e312b104747..a0c83c06f7e 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -4133,7 +4133,6 @@ gf_is_service_running(char *pidfile, int *pid) ret = lockf(fno, F_TEST, 0); if (ret == -1) { running = _gf_true; - goto out; } ret = fscanf(file, "%d", pid); @@ -4141,6 +4140,8 @@ gf_is_service_running(char *pidfile, int *pid) gf_msg("", GF_LOG_ERROR, errno, LG_MSG_FILE_OP_FAILED, "Unable to read pidfile: %s", pidfile); *pid = -1; + running = _gf_false; + goto out; } running = gf_is_pid_running(*pid); |