summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaushik BV <kaushikbv@gluster.com>2011-03-30 06:03:05 +0000
committerVijay Bellur <vijay@dev.gluster.com>2011-03-30 08:22:05 -0700
commitf8c798350a5efa537418d1453f3e547574e68b55 (patch)
tree9fef95354664ebb7c3d9d87a85359b4aaed6040f
parentd1c0e5b0dc64bb431c384b7584ea362143d8ef46 (diff)
mgmt/Glusterd: add pid extension to the pid file of the gsyncd
Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2538 (pidfile naming) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2538
-rw-r--r--cli/src/cli-rpc-ops.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index bb67af40c95..503611a8795 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -2635,7 +2635,7 @@ gf_cli3_1_gsync_get_pid_file (char *pidfolder, char *pidfile, char *master, char
ptr = fgets(buff, sizeof(buff), in);
if (ptr) {
buff[strlen(buff)-1]='\0'; //strip off \n
- snprintf (buffer, PATH_MAX, "%s/%s", pidfolder, buff);
+ snprintf (buffer, PATH_MAX, "%s/%s.pid", pidfolder, buff);
strncpy (pidfile, buffer, PATH_MAX);
}
else {
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 29c8d86e9f4..f2c5c3ff259 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -1732,7 +1732,7 @@ glusterd_gsync_get_pid_file (char *pidfile, char *master, char *slave)
ptr = fgets(buff, sizeof(buff), in);
if (ptr) {
buff[strlen(buff)-1]='\0'; //strip off \n
- snprintf (buffer, PATH_MAX, "%s/%s", pidfolder, buff);
+ snprintf (buffer, PATH_MAX, "%s/%s.pid", pidfolder, buff);
strncpy (pidfile, buffer, PATH_MAX);
}
else {