Hello Dan Burkert, Adar Dembo,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/4594
to review the following change.
Change subject: KUDU-1674: Fix SubProcess:Call SEGV when trying to capture
stderr alone
......................................................................
KUDU-1674: Fix SubProcess:Call SEGV when trying to capture stderr alone
ReadFdsFully() captures either stdout or stderr or both depending on how
caller has registered. Once the helpers are done with capturing, it needs
take into account that there can be less than 2 fds registered from the
caller and hence can not do std::move(vector[1]) operation on it.
Also added a test code to exercise combination of:
SubProcess::Call(argv[0], nullptr, &stderr);
SubProcess::Call(argv[0], &stdout, nullptr);
Change-Id: I67bd462098526a9ba032669b621b8139b56ee5b8
---
M src/kudu/util/subprocess-test.cc
M src/kudu/util/subprocess.cc
2 files changed, 33 insertions(+), 4 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/94/4594/1
--
To view, visit http://gerrit.cloudera.org:8080/4594
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I67bd462098526a9ba032669b621b8139b56ee5b8
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dinesh Bhat <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>