Clarify in the docs what belongs in portability/
[folly.git] / folly / Subprocess.h
index 2afa2382b1fd66fb9e091c29cbc9ac23eb853886..f1dd2ecd9b4548189b0db41a907e7c59dba9544a 100644 (file)
 #include <folly/Range.h>
 #include <folly/gen/String.h>
 #include <folly/io/IOBufQueue.h>
+#include <folly/portability/SysResource.h>
 
 namespace folly {
 
@@ -216,7 +217,7 @@ class SubprocessError : public std::exception {};
 class CalledProcessError : public SubprocessError {
  public:
   explicit CalledProcessError(ProcessReturnCode rc);
-  ~CalledProcessError() throw() = default;
+  ~CalledProcessError() throw() override = default;
   const char* what() const throw() override { return what_.c_str(); }
   ProcessReturnCode returnCode() const { return returnCode_; }
  private:
@@ -230,7 +231,7 @@ class CalledProcessError : public SubprocessError {
 class SubprocessSpawnError : public SubprocessError {
  public:
   SubprocessSpawnError(const char* executable, int errCode, int errnoValue);
-  ~SubprocessSpawnError() throw() = default;
+  ~SubprocessSpawnError() throw() override = default;
   const char* what() const throw() override { return what_.c_str(); }
   int errnoValue() const { return errnoValue_; }
 
@@ -509,7 +510,7 @@ class Subprocess {
    * e.g. if you wait for the underlying process without going through this
    * Subprocess instance.
    */
-  ProcessReturnCode poll();
+  ProcessReturnCode poll(struct rusage* ru = nullptr);
 
   /**
    * Poll the child's status.  If the process is still running, return false.