Bug 764294 (GLUSTER-2562) - invoke external commands precisely with fork + exec
Summary: invoke external commands precisely with fork + exec
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-2562
Product: GlusterFS
Classification: Community
Component: core
Version: mainline
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Csaba Henk
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-18 13:04 UTC by Csaba Henk
Modified: 2012-04-03 06:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: RTNR
Mount Type: ---
Documentation: ---
CRM:
Verified Versions: master(glusterfs 3git built on Sep 16 2011)


Attachments (Terms of Use)

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)


Note You need to log in before you can comment on or make changes to this bug.