Bug 764294 (GLUSTER-2562)

Summary: invoke external commands precisely with fork + exec
Product: [Community] GlusterFS Reporter: Csaba Henk <csaba>
Component: coreAssignee: Csaba Henk <csaba>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: mainlineCC: 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:

Description Csaba Henk 2011-03-18 13:04:02 UTC
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

Comment 1 Anand Avati 2011-05-26 12:55:11 UTC
PATCH: http://patches.gluster.com/patch/7250 in master (libglusterfs: clean up memory types)

Comment 2 Anand Avati 2011-05-26 12:55:15 UTC
PATCH: http://patches.gluster.com/patch/7251 in master (libglusterfs: add 'run' sub-lib for safe and convenient invocation of external programs)

Comment 3 Anand Avati 2011-05-26 12:55:19 UTC
PATCH: http://patches.gluster.com/patch/7252 in master (reimplement invocation of external programs with run API)

Comment 4 Csaba Henk 2011-08-25 10:08:14 UTC
*** Bug 2787 has been marked as a duplicate of this bug. ***

Comment 5 Anand Avati 2011-09-19 02:51:56 UTC
CHANGE: http://review.gluster.com/428 (When run was doing a program invocation like "echo foo > foof",) merged in master by Vijay Bellur (vijay)

Comment 6 Anand Avati 2012-04-03 06:11:27 UTC
CHANGE: http://review.gluster.com/3068 (libglusterfs/run: POSIX compatible closing of child fds on non-Linux) merged in master by Vijay Bellur (vijay)