| Summary: | invoke external commands precisely with fork + exec | ||
|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | Csaba Henk <csaba> |
| Component: | core | Assignee: | Csaba Henk <csaba> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | mainline | CC: | gluster-bugs, rahulcs, vijaykumar |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | --- | |
| Regression: | RTNR | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | master(glusterfs 3git built on Sep 16 2011) | Category: | --- |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
PATCH: http://patches.gluster.com/patch/7250 in master (libglusterfs: clean up memory types) PATCH: http://patches.gluster.com/patch/7251 in master (libglusterfs: add 'run' sub-lib for safe and convenient invocation of external programs) PATCH: http://patches.gluster.com/patch/7252 in master (reimplement invocation of external programs with run API) *** Bug 2787 has been marked as a duplicate of this bug. *** CHANGE: http://review.gluster.com/428 (When run was doing a program invocation like "echo foo > foof",) merged in master by Vijay Bellur (vijay) CHANGE: http://review.gluster.com/3068 (libglusterfs/run: POSIX compatible closing of child fds on non-Linux) merged in master by Vijay Bellur (vijay) |
Adding "run" API for invoking external commands, with following features: - 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 popen(cmd, "r") like functionality