From 302ad26982d1eb7762e743e14dda627ffb317379 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Thu, 26 May 2011 03:32:26 +0000 Subject: libglusterfs: add 'run' sub-lib for safe and convenient invocation of external programs Summary: - arguments first collected, then the invocation happens with fork + exec - flexible specification of arguments (besides si{mp,ng}le argument addition, support for adding multiple of them at a time / specifying one with printf style formatting) [ ==> goodbye printf percentage soup when composing commands ] - single point of error check - simple command runs are done in just one line - support for redirection, popen(3) like functionality API is documented in details in libglusterfs/src/run.h Signed-off-by: Csaba Henk Signed-off-by: Anand Avati BUG: 2562 (invoke external commands precisely with fork + exec) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2562 --- libglusterfs/src/mem-types.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libglusterfs/src/mem-types.h') diff --git a/libglusterfs/src/mem-types.h b/libglusterfs/src/mem-types.h index 9d63d28a..d09472f9 100644 --- a/libglusterfs/src/mem-types.h +++ b/libglusterfs/src/mem-types.h @@ -104,6 +104,8 @@ enum gf_common_mem_types_ { gf_common_mt_trie_node = 79, gf_common_mt_trie_buf = 80, gf_common_mt_trie_end = 81, - gf_common_mt_end = 82 + gf_common_mt_run_argv = 82, + gf_common_mt_run_logbuf = 83, + gf_common_mt_end = 84 }; #endif -- cgit