diff options
author | Csaba Henk <csaba@gluster.com> | 2011-09-15 02:29:54 +0200 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-09-18 22:51:54 -0700 |
commit | 003a578d9b324e769e231451a53688b48550e0f0 (patch) | |
tree | 1fc2d5617059717ecee98f942f6ab6646c0e1c8e /xlators | |
parent | 35bbb34a3f4a74f0d2288aacd984c71c7ebdfa3c (diff) |
libglusterfs: run: fix closing of redirection fd in child
When run was doing a program invocation like "echo foo > foof",
the file descriptor to foof was closed before stdout could be
reopened to it.
To fix this, we change the order of actions: first do redirections,
then do the fd cleanup. This also simplifies code (as there are less
fds which are exempt of the cleanup).
Change-Id: I5f74e41f2999e59916a40c8a89d7fb730d808c27
BUG: 2562
Reported-by: Rajesh Amaravathi <rajesh@gluster.com>
Reviewed-on: http://review.gluster.com/428
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: Rajesh Amaravathi <rajesh@gluster.com>
Reviewed-by: Rajesh Amaravathi <rajesh@gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
Diffstat (limited to 'xlators')
0 files changed, 0 insertions, 0 deletions