projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc6cfb0
)
set pid_=-1 after wait, actually implement pid()
author
Tudor Bosman
<tudorb@fb.com>
Wed, 16 Jan 2013 22:52:04 +0000
(14:52 -0800)
committer
Jordan DeLong
<jdelong@fb.com>
Sat, 19 Jan 2013 00:38:16 +0000
(16:38 -0800)
Summary: minor issues in folly::Subprocess
Test Plan: subprocess_test
Reviewed By: philipp@fb.com
FB internal diff:
D680959
folly/Subprocess.cpp
patch
|
blob
|
history
diff --git
a/folly/Subprocess.cpp
b/folly/Subprocess.cpp
index da69e5368e4649f1da07317e9b432077b9b6ffdb..1470a7066384bb66c1f81732fcce7c7385e2e0aa 100644
(file)
--- a/
folly/Subprocess.cpp
+++ b/
folly/Subprocess.cpp
@@
-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) {