Commit d870f36c authored by Tudor Bosman's avatar Tudor Bosman Committed by Jordan DeLong

fix typos in comment; RV_* do not have to be public

Test Plan: subprocess_test

Reviewed By: chip@fb.com

FB internal diff: D619189
parent 677bed09
...@@ -322,9 +322,9 @@ class Subprocess : private boost::noncopyable { ...@@ -322,9 +322,9 @@ class Subprocess : private boost::noncopyable {
* set errno to EAGAIN (in which case you should return false). * set errno to EAGAIN (in which case you should return false).
* *
* NOTE that you MUST consume all data passed to readCallback (or return * NOTE that you MUST consume all data passed to readCallback (or return
* false, which will close the pipe, possibly sending SIGPIPE to the child or * true, which will close the pipe, possibly sending SIGPIPE to the child or
* making its writes fail with EPIPE), and you MUST write to a writable pipe * making its writes fail with EPIPE), and you MUST write to a writable pipe
* (or return false, which will close the pipe). To do otherwise is an * (or return true, which will close the pipe). To do otherwise is an
* error. You must do this even for pipes you are not interested in. * error. You must do this even for pipes you are not interested in.
* *
* Note that communicate() returns when all pipes to/from the child are * Note that communicate() returns when all pipes to/from the child are
...@@ -342,9 +342,6 @@ class Subprocess : private boost::noncopyable { ...@@ -342,9 +342,6 @@ class Subprocess : private boost::noncopyable {
*/ */
pid_t pid() const; pid_t pid() const;
static const int RV_RUNNING = ProcessReturnCode::RV_RUNNING;
static const int RV_NOT_STARTED = ProcessReturnCode::RV_NOT_STARTED;
/** /**
* Return the child's status (as per wait()) if the process has already * Return the child's status (as per wait()) if the process has already
* been waited on, -1 if the process is still running, or -2 if the process * been waited on, -1 if the process is still running, or -2 if the process
...@@ -371,7 +368,7 @@ class Subprocess : private boost::noncopyable { ...@@ -371,7 +368,7 @@ class Subprocess : private boost::noncopyable {
/** /**
* Wait for the process to terminate and return its status. * Wait for the process to terminate and return its status.
* Similarly to poll, it is illegal to call poll after the process * Similarly to poll, it is illegal to call wait after the process
* has already been reaped or if the process has not successfully started. * has already been reaped or if the process has not successfully started.
*/ */
ProcessReturnCode wait(); ProcessReturnCode wait();
...@@ -413,6 +410,9 @@ class Subprocess : private boost::noncopyable { ...@@ -413,6 +410,9 @@ class Subprocess : private boost::noncopyable {
void kill() { sendSignal(SIGKILL); } void kill() { sendSignal(SIGKILL); }
private: private:
static const int RV_RUNNING = ProcessReturnCode::RV_RUNNING;
static const int RV_NOT_STARTED = ProcessReturnCode::RV_NOT_STARTED;
void spawn( void spawn(
std::unique_ptr<const char*[]> argv, std::unique_ptr<const char*[]> argv,
const char* executable, const char* executable,
......
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