diff options
author | Csaba Henk <csaba@gluster.com> | 2011-05-26 03:32:26 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-05-26 08:55:18 -0700 |
commit | 302ad26982d1eb7762e743e14dda627ffb317379 (patch) | |
tree | 6028138f92c630f76903bce11bacd0146cb14a26 /libglusterfs/src/mem-types.h | |
parent | 3435813379c276c3c020cb4e3942554be0040ecc (diff) |
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 <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2562 (invoke external commands precisely with fork + exec)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2562
Diffstat (limited to 'libglusterfs/src/mem-types.h')
-rw-r--r-- | libglusterfs/src/mem-types.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libglusterfs/src/mem-types.h b/libglusterfs/src/mem-types.h index 9d63d28af97..d09472f992f 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 |