friend class Subprocess;
public:
enum State {
+ // Subprocess starts in the constructor, so this state designates only
+ // default-initialized or moved-out ProcessReturnCodes.
NOT_STARTED,
RUNNING,
EXITED,
KILLED
};
+ // Default-initialized for convenience. Subprocess::returnCode() will
+ // never produce this value.
+ ProcessReturnCode() : ProcessReturnCode(RV_NOT_STARTED) {}
+
// Trivially copyable
ProcessReturnCode(const ProcessReturnCode& p) = default;
ProcessReturnCode& operator=(const ProcessReturnCode& p) = default;
public:
explicit CalledProcessError(ProcessReturnCode rc);
~CalledProcessError() throw() = default;
- const char* what() const throw() FOLLY_OVERRIDE { return what_.c_str(); }
+ const char* what() const throw() override { return what_.c_str(); }
ProcessReturnCode returnCode() const { return returnCode_; }
private:
ProcessReturnCode returnCode_;
public:
SubprocessSpawnError(const char* executable, int errCode, int errnoValue);
~SubprocessSpawnError() throw() = default;
- const char* what() const throw() FOLLY_OVERRIDE { return what_.c_str(); }
+ const char* what() const throw() override { return what_.c_str(); }
int errnoValue() const { return errnoValue_; }
private: