summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-08-21 01:54:30 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-21 05:17:37 -0700
commita437f594608cd307ca2c25871b79966de54cc93f (patch)
treea1ef88de0020f9e01068f6d4c4a22a1387ea1a05 /xlators
parentad0e7a86c256b6e49daddafd954809b6040804b2 (diff)
gf_system: fork/exec instead of system
* most of the glusterd 'system()' are replaced with 'gf_system()' Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1292 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1292
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c14
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c2
2 files changed, 8 insertions, 8 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index d24a4f159..b243e7895 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -294,7 +294,7 @@ glusterd_volume_create_generate_volfiles (glusterd_volinfo_t *volinfo)
" -c %s -r 1 %s -p %d --num-replica %d",
GFS_PREFIX, volinfo->volname, path, bricks,
volinfo->port, volinfo->sub_count);
- ret = system (cmd_str);
+ ret = gf_system (cmd_str);
gf_log ("", 1, "%s", cmd_str);
break;
}
@@ -306,7 +306,7 @@ glusterd_volume_create_generate_volfiles (glusterd_volinfo_t *volinfo)
" -c %s -r 0 %s -p %d --num-stripe %d",
GFS_PREFIX, volinfo->volname, path, bricks,
volinfo->port, volinfo->sub_count);
- ret = system (cmd_str);
+ ret = gf_system (cmd_str);
gf_log ("", 1, "%s", cmd_str);
break;
}
@@ -318,7 +318,7 @@ glusterd_volume_create_generate_volfiles (glusterd_volinfo_t *volinfo)
" -n %s -c %s %s -p %d",
GFS_PREFIX, volinfo->volname, path, bricks,
volinfo->port);
- ret = system (cmd_str);
+ ret = gf_system (cmd_str);
gf_log ("", 1, "%s", cmd_str);
break;
}
@@ -1013,7 +1013,7 @@ rb_spawn_dst_brick (glusterd_volinfo_t *volinfo,
priv->workdir, volinfo->volname,
RB_DSTBRICK_PIDFILE);
- ret = system (cmd_str);
+ ret = gf_system (cmd_str);
if (ret) {
gf_log ("", GF_LOG_DEBUG,
"Could not start glusterfs");
@@ -1048,7 +1048,7 @@ rb_spawn_glusterfs_client (glusterd_volinfo_t *volinfo,
priv->workdir, volinfo->volname,
RB_CLIENT_MOUNTPOINT);
- ret = system (cmd_str);
+ ret = gf_system (cmd_str);
if (ret) {
gf_log ("", GF_LOG_DEBUG,
"Could not start glusterfs");
@@ -1255,11 +1255,11 @@ rb_destroy_maintainence_client (glusterd_volinfo_t *volinfo,
goto out;
}
- snprintf (cmd_str, 8192, "umount -f %s/vols/%s/%s",
+ snprintf (cmd_str, 8192, "/bin/umount -f %s/vols/%s/%s",
priv->workdir, volinfo->volname,
RB_CLIENT_MOUNTPOINT);
- ret = system (cmd_str);
+ ret = gf_system (cmd_str);
if (ret) {
gf_log ("", GF_LOG_DEBUG,
"umount failed on maintainence client");
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 424c35f2f..35dfa3dfb 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -771,7 +771,7 @@ glusterd_volume_start_glusterfs (glusterd_volinfo_t *volinfo,
"-s localhost --volfile-id %s -p %s --brick-name %s "
"--brick-port %d", GFS_PREFIX,
port, volfile, pidfile, brickinfo->path, port);
- ret = system (cmd_str);
+ ret = gf_system (cmd_str);
if (ret == 0) {
//pmap_registry_bind (THIS, port, brickinfo->path);