Commit 36a716b7 authored by Tudor Bosman's avatar Tudor Bosman Committed by Jordan DeLong

set pid_=-1 after wait, actually implement pid()

Summary: minor issues in folly::Subprocess

Test Plan: subprocess_test

Reviewed By: philipp@fb.com

FB internal diff: D680959
parent dc6cfb04
......@@ -427,6 +427,7 @@ ProcessReturnCode Subprocess::wait() {
checkUnixError(found, "waitpid");
DCHECK_EQ(found, pid_);
returnCode_ = ProcessReturnCode(status);
pid_ = -1;
return returnCode_;
}
......@@ -441,6 +442,10 @@ void Subprocess::sendSignal(int signal) {
checkUnixError(r, "kill");
}
pid_t Subprocess::pid() const {
return pid_;
}
namespace {
std::pair<const uint8_t*, size_t> queueFront(const IOBufQueue& queue) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment